summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2019-11-14 21:27:00 +0100
committerWolfram Sang <wsa@the-dreams.de>2019-11-14 21:27:00 +0100
commit993e21940684f989a62809790eff841b80d2eeb4 (patch)
treef2c4fededb5def0138d7d15a9c37cb9418ba18d9 /drivers/misc
parent7be5f90f689af5abb6b16755e212f76ed97a20dd (diff)
parent285be87c79e173f08af5e1a6417a106fb14934b7 (diff)
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
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/eeprom/at24.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c
index 2cccd82a3106..0681d5fdd538 100644
--- a/drivers/misc/eeprom/at24.c
+++ b/drivers/misc/eeprom/at24.c
@@ -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;
}