Commit 893c3d82 authored by Wang Qing's avatar Wang Qing Committed by Wim Van Sebroeck

watchdog: Use kobj_to_dev() API

Use kobj_to_dev() API instead of container_of().
Signed-off-by: default avatarWang Qing <wangqing@vivo.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/1591945384-14587-1-git-send-email-wangqing@vivo.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent fd998972
......@@ -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;
......
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