summaryrefslogtreecommitdiff
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorWang Qing <wangqing@vivo.com>2020-06-12 15:03:04 +0800
committerWim Van Sebroeck <wim@linux-watchdog.org>2020-08-05 18:42:46 +0200
commit893c3d82b425d8d448da030c80420072ff4edbf1 (patch)
tree250d7a9cf40d3eb8d1769354bfe20724ac3320d3 /drivers/watchdog
parentfd998972458f06d3fadbf4e55a3725c4edc17c12 (diff)
watchdog: Use kobj_to_dev() API
Use kobj_to_dev() API instead of container_of(). Signed-off-by: Wang Qing <wangqing@vivo.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/1591945384-14587-1-git-send-email-wangqing@vivo.com Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/watchdog_dev.c2
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;