diff options
author | Wang Qing <[email protected]> | 2020-06-12 15:03:04 +0800 |
---|---|---|
committer | Wim Van Sebroeck <[email protected]> | 2020-08-05 18:42:46 +0200 |
commit | 893c3d82b425d8d448da030c80420072ff4edbf1 (patch) | |
tree | 250d7a9cf40d3eb8d1769354bfe20724ac3320d3 | |
parent | fd998972458f06d3fadbf4e55a3725c4edc17c12 (diff) |
watchdog: Use kobj_to_dev() API
Use kobj_to_dev() API instead of container_of().
Signed-off-by: Wang Qing <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
-rw-r--r-- | drivers/watchdog/watchdog_dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c index 3ae608d78af2..de02d90a4878 100644 --- a/drivers/watchdog/watchdog_dev.c +++ b/drivers/watchdog/watchdog_dev.c @@ -587,7 +587,7 @@ static DEVICE_ATTR_RW(pretimeout_governor); static umode_t wdt_is_visible(struct kobject *kobj, struct attribute *attr, int n) { - struct device *dev = container_of(kobj, struct device, kobj); + struct device *dev = kobj_to_dev(kobj); struct watchdog_device *wdd = dev_get_drvdata(dev); umode_t mode = attr->mode; |