diff options
author | Guenter Roeck <linux@roeck-us.net> | 2021-03-18 12:06:19 -0700 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2021-04-20 06:50:14 -0700 |
commit | 9d2227bb9bd4ae799e77c0575452e7e5716658ea (patch) | |
tree | 34268feac8b1e332f50ac8619ed4a5c424b97825 /drivers/hwmon/adc128d818.c | |
parent | f3e3464ec893409189cb1a0657c2eca31ca82504 (diff) | |
download | linux-9d2227bb9bd4ae799e77c0575452e7e5716658ea.tar.gz linux-9d2227bb9bd4ae799e77c0575452e7e5716658ea.tar.bz2 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) { |