summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/ds1621.c
diff options
context:
space:
mode:
authorTian Tao <tiantao6@hisilicon.com>2021-03-18 09:55:04 +0800
committerGuenter Roeck <linux@roeck-us.net>2021-04-20 06:50:14 -0700
commitf3e3464ec893409189cb1a0657c2eca31ca82504 (patch)
treec63ad1ab6bcd2ca424d5fb17b1e50d61db9e35fe /drivers/hwmon/ds1621.c
parent23bc3caf42bd0f140182ba60cc68d7872e81aeea (diff)
downloadlinux-f3e3464ec893409189cb1a0657c2eca31ca82504.tar.gz
linux-f3e3464ec893409189cb1a0657c2eca31ca82504.tar.bz2
linux-f3e3464ec893409189cb1a0657c2eca31ca82504.zip
hwmon: (ds1621) Use kobj_to_dev()
fixed the following coccicheck: ./drivers/hwmon/ds1621.c:329:60-61: WARNING opportunity for kobj_to_dev(). Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Link: https://lore.kernel.org/r/1616032504-59817-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/ds1621.c')
-rw-r--r--drivers/hwmon/ds1621.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c
index e1d742bfc74c..bf1c4b7ecb40 100644
--- a/drivers/hwmon/ds1621.c
+++ b/drivers/hwmon/ds1621.c
@@ -326,7 +326,7 @@ static struct attribute *ds1621_attributes[] = {
static umode_t ds1621_attribute_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 ds1621_data *data = dev_get_drvdata(dev);
if (attr == &dev_attr_update_interval.attr)