diff options
author | Cosmin Tanislav <cosmin.tanislav@analog.com> | 2021-12-21 23:58:37 +0200 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2022-02-27 17:03:18 -0800 |
commit | a748d30c37bb7d238e5869f4f4d6037367493ebe (patch) | |
tree | 84d27a54b177d0dd9472789df42084833f763e60 /drivers/hwmon/adt7410.c | |
parent | hwmon: (adt7x10) Add device managed action for restoring config (diff) | |
download | linux-dev-a748d30c37bb7d238e5869f4f4d6037367493ebe.tar.xz linux-dev-a748d30c37bb7d238e5869f4f4d6037367493ebe.zip |
hwmon: (adt7x10) Use devm_hwmon_device_register_with_info
Describe the only available channel, implement read, write
and is_visible callbacks.
Also, pass name to core driver for the i2c device so that
it can be used to register hwmon device.
Signed-off-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Link: https://lore.kernel.org/r/20211221215841.2641417-4-demonsingur@gmail.com
[groeck: Adjusted to use regmap]
Tested-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Reviewed-by: Cosmin Tanislav <cosmin.tanislav@analog.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/adt7410.c')
-rw-r--r-- | drivers/hwmon/adt7410.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/adt7410.c b/drivers/hwmon/adt7410.c index b1f4497dca05..81950a079c2f 100644 --- a/drivers/hwmon/adt7410.c +++ b/drivers/hwmon/adt7410.c @@ -84,7 +84,7 @@ static int adt7410_i2c_probe(struct i2c_client *client) if (IS_ERR(regmap)) return PTR_ERR(regmap); - return adt7x10_probe(&client->dev, NULL, client->irq, regmap); + return adt7x10_probe(&client->dev, client->name, client->irq, regmap); } static int adt7410_i2c_remove(struct i2c_client *client) |