diff options
author | Guenter Roeck <linux@roeck-us.net> | 2021-03-18 20:06:19 +0100 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2021-04-20 15:50:14 +0200 |
commit | 9d2227bb9bd4ae799e77c0575452e7e5716658ea (patch) | |
tree | 34268feac8b1e332f50ac8619ed4a5c424b97825 /drivers/hwmon/adc128d818.c | |
parent | hwmon: (ds1621) Use kobj_to_dev() (diff) | |
download | linux-9d2227bb9bd4ae799e77c0575452e7e5716658ea.tar.xz linux-9d2227bb9bd4ae799e77c0575452e7e5716658ea.zip |
hwmon: Use kobj_to_dev()
coccinelle complains about
WARNING opportunity for kobj_to_dev()
in several files, resulting in one-by-one patch submissions.
Handle all remaining instances in one go.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/adc128d818.c')
-rw-r--r-- | drivers/hwmon/adc128d818.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/adc128d818.c b/drivers/hwmon/adc128d818.c index 6c9a906631b8..fd938c70293f 100644 --- a/drivers/hwmon/adc128d818.c +++ b/drivers/hwmon/adc128d818.c @@ -248,7 +248,7 @@ static ssize_t adc128_alarm_show(struct device *dev, static umode_t adc128_is_visible(struct kobject *kobj, struct attribute *attr, int index) { - struct device *dev = container_of(kobj, struct device, kobj); + struct device *dev = kobj_to_dev(kobj); struct adc128_data *data = dev_get_drvdata(dev); if (index < ADC128_ATTR_NUM_VOLT) { |