mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 17:46:47 +07:00
eeprom: at24: Improve confusing log message
Currently when binding to an spd EEPROM, the at24 drivers logs the following message: 256 byte spd EEPROM, read-only, 0 bytes/write The last part is confusing, as by definition you don't write to a read-only EEPROM, plus "0 bytes/write" makes no sense whatsoever. I propose to have a different message for read-only EEPROMs, which does not include this last part. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
This commit is contained in:
parent
54ecb8f702
commit
285be87c79
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user