fixed the following coccicheck: ./drivers/hwmon/ds1621.c:329:60-61: WARNING opportunity for kobj_to_dev(). Signed-off-by: Tian Tao <tiantao6@xxxxxxxxxxxxx> --- drivers/hwmon/ds1621.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c index e1d742b..bf1c4b7 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) -- 2.7.4