hwmon: adt7410: fix hwmon sysfs attrs not being created
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
Signed-off-by Cosmin Tanislav <[email protected]>
--- drivers/hwmon/adt7410.c | 2 +- drivers/hwmon/adt7x10.c | 56 ++++++++--------------------------------- 2 files changed, 12 insertions(+), 46 deletions(-)
drivers/hwmon/adt7410.c +1 -1
@@ -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