Commit f1fc688c authored by Tian Tao's avatar Tian Tao Committed by Guenter Roeck

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: default avatarTian Tao <tiantao6@hisilicon.com>
Link: https://lore.kernel.org/r/1609376621-46463-1-git-send-email-tiantao6@hisilicon.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent f0dc7cb6
...@@ -321,7 +321,7 @@ static SENSOR_DEVICE_ATTR_RO(gpio2_alarm, alarm, MAX6650_ALRM_GPIO2); ...@@ -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, static umode_t max6650_attrs_visible(struct kobject *kobj, struct attribute *a,
int n) 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 max6650_data *data = dev_get_drvdata(dev);
struct device_attribute *devattr; struct device_attribute *devattr;
......
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