Merge tag 'at24-v5.5-updates-for-wolfram' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-5.5

at24: updates for v5.5

- print a proper log message for read-only EEPROMs
This commit is contained in:
Wolfram Sang
2019-11-14 21:27:00 +01:00

View File

@@ -716,9 +716,12 @@ static int at24_probe(struct i2c_client *client)
return -ENODEV;
}
dev_info(dev, "%u byte %s EEPROM, %s, %u bytes/write\n",
byte_len, client->name,
writable ? "writable" : "read-only", at24->write_max);
if (writable)
dev_info(dev, "%u byte %s EEPROM, writable, %u bytes/write\n",
byte_len, client->name, at24->write_max);
else
dev_info(dev, "%u byte %s EEPROM, read-only\n",
byte_len, client->name);
return 0;
}