Skip to contentSkip to conversation

hwmon: w83795: Convert to hwmon_device_register_with_info()

PATCH In review Aleksei Mamlin 2 participants 2 messages Jul 3, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: w83795: Convert to hwmon_device_register_with_info()

This patch replaces deprecated call to hwmon_device_register() with the new hwmon_device_register_with_info().

---
 drivers/hwmon/w83795.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/hwmon/w83795.c +2 -1
index 49276bbdac3d..25bcf988ef1c 100644
@@ -2234,7 +2234,8 @@ static int w83795_probe(struct i2c_client *client,
 	if (data->chip_type == w83795g)
 		w83795_check_dynamic_in_limits(client);
 
-	data->hwmon_dev = hwmon_device_register(dev);
+	data->hwmon_dev = hwmon_device_register_with_info(dev, client->name,
+							  data, NULL, NULL);
 	if (IS_ERR(data->hwmon_dev)) {
 		err = PTR_ERR(data->hwmon_dev);
 		goto exit_remove;
Signature · 1 line
2.16.4
maintainer
#1 lore raw
Quoted 4 lines · Aleksei Mamlin

This patch replaces deprecated call to hwmon_device_register() with the new hwmon_device_register_with_info().

NACK. This doesn't really convert anything, it just exploits a loophole that was necessary because some drivers can not be converted cleanly.

Guenter

Quoted 21 lines
---
 drivers/hwmon/w83795.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/hwmon/w83795.c +2 -1
index 49276bbdac3d..25bcf988ef1c 100644
@@ -2234,7 +2234,8 @@ static int w83795_probe(struct i2c_client *client,
 	if (data->chip_type == w83795g)
 		w83795_check_dynamic_in_limits(client);
 
-	data->hwmon_dev = hwmon_device_register(dev);
+	data->hwmon_dev = hwmon_device_register_with_info(dev, client->name,
+							  data, NULL, NULL);
 	if (IS_ERR(data->hwmon_dev)) {
 		err = PTR_ERR(data->hwmon_dev);
 		goto exit_remove;
Signature · 1 line
2.16.4