diff options
author | 2021-03-18 12:06:19 -0700 | |
---|---|---|
committer | 2021-04-20 06:50:14 -0700 | |
commit | 9d2227bb9bd4ae799e77c0575452e7e5716658ea (patch) | |
tree | 34268feac8b1e332f50ac8619ed4a5c424b97825 /drivers/hwmon/max16065.c | |
parent | hwmon: (ds1621) Use kobj_to_dev() (diff) | |
download | linux-9d2227bb9bd4ae799e77c0575452e7e5716658ea.tar.gz linux-9d2227bb9bd4ae799e77c0575452e7e5716658ea.tar.bz2 linux-9d2227bb9bd4ae799e77c0575452e7e5716658ea.zip |
hwmon: Use kobj_to_dev()
coccinelle complains about
WARNING opportunity for kobj_to_dev()
in several files, resulting in one-by-one patch submissions.
Handle all remaining instances in one go.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/max16065.c')
-rw-r--r-- | drivers/hwmon/max16065.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/max16065.c b/drivers/hwmon/max16065.c index a26226e7bc37..0de2da3e5c46 100644 --- a/drivers/hwmon/max16065.c +++ b/drivers/hwmon/max16065.c @@ -454,7 +454,7 @@ static struct attribute *max16065_max_attributes[] = { static umode_t max16065_basic_is_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 max16065_data *data = dev_get_drvdata(dev); int index = n / 4; @@ -466,7 +466,7 @@ static umode_t max16065_basic_is_visible(struct kobject *kobj, static umode_t max16065_secondary_is_visible(struct kobject *kobj, struct attribute *a, int index) { - struct device *dev = container_of(kobj, struct device, kobj); + struct device *dev = kobj_to_dev(kobj); struct max16065_data *data = dev_get_drvdata(dev); if (index >= data->num_adc) |