Skip to contentSkip to conversation

hwmon: adt7410: fix hwmon sysfs attrs not being created

PATCH Superseded Cosmin Tanislav 1 participant 1 message Aug 24, 2021 Hardware monitoring

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: adt7410: fix hwmon sysfs attrs not being created

* store bus device into private data to use both in hwmon_dev contexts and outside of them
* pass client name from adt7410 driver to common driver and use it register hwmon device
* switch from hwmon_device_register to hwmon_device_register_with_groups to remove the deprecation warning

---
 drivers/hwmon/adt7410.c |  2 +-
 drivers/hwmon/adt7x10.c | 56 ++++++++---------------------------------
 2 files changed, 12 insertions(+), 46 deletions(-)
drivers/hwmon/adt7410.c +1 -1
index 9d80895d0266..5c816760fd78 100644
@@ -45,7 +45,7 @@ static int adt7410_i2c_probe(struct i2c_client *client)
 			I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA))
 		return -ENODEV;
 
-	return adt7x10_probe(&client->dev, NULL, client->irq, &adt7410_i2c_ops);
+	return adt7x10_probe(&client->dev, client->name, client->irq, &adt7410_i2c_ops);
 }
 
 static int adt7410_i2c_remove(struct i2c_client *client)
drivers/hwmon/adt7x10.c +11 -45

129 lines not on this page · raw message

Signature · 1 line
2.33.0