aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/max6697.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2021-03-18 12:06:19 -0700
committerGuenter Roeck <linux@roeck-us.net>2021-04-20 06:50:14 -0700
commit9d2227bb9bd4ae799e77c0575452e7e5716658ea (patch)
tree34268feac8b1e332f50ac8619ed4a5c424b97825 /drivers/hwmon/max6697.c
parenthwmon: (ds1621) Use kobj_to_dev() (diff)
downloadlinux-dev-9d2227bb9bd4ae799e77c0575452e7e5716658ea.tar.xz
linux-dev-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/max6697.c')
-rw-r--r--drivers/hwmon/max6697.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/max6697.c b/drivers/hwmon/max6697.c
index fc3241101178..2895cea54193 100644
--- a/drivers/hwmon/max6697.c
+++ b/drivers/hwmon/max6697.c
@@ -460,7 +460,7 @@ static DEVICE_ATTR(dummy, 0, NULL, NULL);
static umode_t max6697_is_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 max6697_data *data = dev_get_drvdata(dev);
const struct max6697_chip_data *chip = data->chip;
int channel = index / 7; /* channel number */