summaryrefslogtreecommitdiff
path: root/drivers/hwmon/adc128d818.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2021-03-18 22:06:19 +0300
committerGuenter Roeck <linux@roeck-us.net>2021-04-20 16:50:14 +0300
commit9d2227bb9bd4ae799e77c0575452e7e5716658ea (patch)
tree34268feac8b1e332f50ac8619ed4a5c424b97825 /drivers/hwmon/adc128d818.c
parentf3e3464ec893409189cb1a0657c2eca31ca82504 (diff)
downloadlinux-9d2227bb9bd4ae799e77c0575452e7e5716658ea.tar.xz
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.c2
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) {