summaryrefslogtreecommitdiff
path: root/drivers/hwmon/ltc2990.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/ltc2990.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/ltc2990.c')
-rw-r--r--drivers/hwmon/ltc2990.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/ltc2990.c b/drivers/hwmon/ltc2990.c
index 78b191b26bb2..fcd31c4fc15e 100644
--- a/drivers/hwmon/ltc2990.c
+++ b/drivers/hwmon/ltc2990.c
@@ -153,7 +153,7 @@ static ssize_t ltc2990_value_show(struct device *dev,
static umode_t ltc2990_attrs_visible(struct kobject *kobj,
struct attribute *a, int n)
{
- struct device *dev = container_of(kobj, struct device, kobj);
+ struct device *dev = kobj_to_dev(kobj);
struct ltc2990_data *data = dev_get_drvdata(dev);
struct device_attribute *da =
container_of(a, struct device_attribute, attr);