summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/max6650.c
diff options
context:
space:
mode:
authorTian Tao <tiantao6@hisilicon.com>2020-12-31 09:03:41 +0800
committerGuenter Roeck <linux@roeck-us.net>2021-01-27 17:44:18 -0800
commitf1fc688c65fd3abe058420c785276c81d4a9c66e (patch)
tree80cbbfed1b2aa32ec0189a3a52c79cb626769295 /drivers/hwmon/max6650.c
parentf0dc7cb6b4c9cd24a69f80423f6d7a03825b72e4 (diff)
downloadlinux-f1fc688c65fd3abe058420c785276c81d4a9c66e.tar.bz2
hwmon: (max6650) Switch to using the new API kobj_to_dev()
Switch to using the new API kobj_to_dev() to fix the below warnning: drivers/hwmon/max6650.c:324:60-61: WARNING opportunity for kobj_to_dev(). Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Link: https://lore.kernel.org/r/1609376621-46463-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/max6650.c')
-rw-r--r--drivers/hwmon/max6650.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/max6650.c b/drivers/hwmon/max6650.c
index cc7f2980fe83..f8d4534ce172 100644
--- a/drivers/hwmon/max6650.c
+++ b/drivers/hwmon/max6650.c
@@ -321,7 +321,7 @@ static SENSOR_DEVICE_ATTR_RO(gpio2_alarm, alarm, MAX6650_ALRM_GPIO2);
static umode_t max6650_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 max6650_data *data = dev_get_drvdata(dev);
struct device_attribute *devattr;