Commit 02c155cb authored by Tian Tao's avatar Tian Tao Committed by Guenter Roeck

hwmon: (abx500) Switch to using the new API kobj_to_dev()

fixed the following coccicheck:
drivers/hwmon/abx500.c:266:60-61: WARNING opportunity for kobj_to_dev().
Signed-off-by: default avatarTian Tao <tiantao6@hisilicon.com>
Link: https://lore.kernel.org/r/1606357280-51921-1-git-send-email-tiantao6@hisilicon.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 12d36c83
......@@ -263,7 +263,7 @@ static ssize_t max_alarm_show(struct device *dev,
static umode_t abx500_attrs_visible(struct kobject *kobj,
struct attribute *attr, int n)
{
struct device *dev = container_of(kobj, struct device, kobj);
struct device *dev = kobj_to_dev(kobj);
struct abx500_temp *data = dev_get_drvdata(dev);
if (data->ops.is_visible)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment