Skip to contentSkip to conversation

eeprom: Warn that the driver is deprecated

PATCH New Jean Delvare 1 participant 1 message Oct 2, 2019 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eeprom: Warn that the driver is deprecated

Deprecating the driver in Kconfig is one thing, but we also need to let the users themselves know. Log a warning each time a device is bound to the deprecated eeprom driver.

Cc Arnd Bergmann <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 drivers/misc/eeprom/eeprom.c |    4 ++++
 1 file changed, 4 insertions(+)
drivers/misc/eeprom/eeprom.c +4 -0
@@ -175,6 +175,10 @@ static int eeprom_probe(struct i2c_clien
 		}
 	}
 
+	/* Let the users know they are using deprecated driver */
+	dev_notice(&client->dev,
+		   "eeprom driver is deprecated, please use at24 instead\n");
+
 	/* create the sysfs eeprom file */
 	return sysfs_create_bin_file(&client->dev.kobj, &eeprom_attr);
 }
Signature · 2 lines
Jean Delvare
SUSE L3 Support