[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190125154604.66801c6a@xhacker.debian>
Date: Fri, 25 Jan 2019 07:52:18 +0000
From: Jisheng Zhang <Jisheng.Zhang@...aptics.com>
To: Wim Van Sebroeck <wim@...ux-watchdog.org>,
Guenter Roeck <linux@...ck-us.net>
CC: "linux-watchdog@...r.kernel.org" <linux-watchdog@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] watchdog: dw: use devm_watchdog_register_device()
Use devm_watchdog_register_device() to simplify the code.
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@...aptics.com>
---
drivers/watchdog/dw_wdt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c
index 501aebb5b81f..c053c2de5c2f 100644
--- a/drivers/watchdog/dw_wdt.c
+++ b/drivers/watchdog/dw_wdt.c
@@ -303,7 +303,7 @@ static int dw_wdt_drv_probe(struct platform_device *pdev)
watchdog_set_restart_priority(wdd, 128);
- ret = watchdog_register_device(wdd);
+ ret = devm_watchdog_register_device(wdd);
if (ret)
goto out_disable_clk;
@@ -318,7 +318,6 @@ static int dw_wdt_drv_remove(struct platform_device *pdev)
{
struct dw_wdt *dw_wdt = platform_get_drvdata(pdev);
- watchdog_unregister_device(&dw_wdt->wdd);
reset_control_assert(dw_wdt->rst);
clk_disable_unprepare(dw_wdt->clk);
--
2.20.1
Powered by blists - more mailing lists