[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1591945384-14587-1-git-send-email-wangqing@vivo.com>
Date: Fri, 12 Jun 2020 15:03:04 +0800
From: Wang Qing <wangqing@...o.com>
To: Wim Van Sebroeck <wim@...ux-watchdog.org>,
Guenter Roeck <linux@...ck-us.net>,
linux-watchdog@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Wang Qing <wangqing@...o.com>
Subject: [PATCH] drivers\watchdog: Use kobj_to_dev() API
Use kobj_to_dev() API instead of container_of().
Signed-off-by: Wang Qing <wangqing@...o.com>
---
drivers/watchdog/watchdog_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
mode change 100644 => 100755 drivers/watchdog/watchdog_dev.c
diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c
index 7e4cd34..9da2360
--- 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;
--
2.7.4
Powered by blists - more mailing lists