projects
/
linux
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79cc4d2
)
watchdog: rti-wdt: Make use of the helper function devm_platform_ioremap_resource()
author
Cai Huoqing
<caihuoqing@baidu.com>
Tue, 7 Sep 2021 07:42:36 +0000
(15:42 +0800)
committer
Wim Van Sebroeck
<wim@linux-watchdog.org>
Tue, 26 Oct 2021 19:31:09 +0000
(21:31 +0200)
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link:
https://lore.kernel.org/r/20210907074237.2808-1-caihuoqing@baidu.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/rti_wdt.c
patch
|
blob
|
history
diff --git
a/drivers/watchdog/rti_wdt.c
b/drivers/watchdog/rti_wdt.c
index 359302f71f7efef34ccc419842a0079be2e364b4..117bc2a8eb0a46be764a1ff667d9c7693c997074 100644
(file)
--- a/
drivers/watchdog/rti_wdt.c
+++ b/
drivers/watchdog/rti_wdt.c
@@
-194,7
+194,6
@@
static int rti_wdt_probe(struct platform_device *pdev)
{
int ret = 0;
struct device *dev = &pdev->dev;
- struct resource *wdt_mem;
struct watchdog_device *wdd;
struct rti_wdt_device *wdt;
struct clk *clk;
@@
-246,8
+245,7
@@
static int rti_wdt_probe(struct platform_device *pdev)
watchdog_set_nowayout(wdd, 1);
watchdog_set_restart_priority(wdd, 128);
- wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- wdt->base = devm_ioremap_resource(dev, wdt_mem);
+ wdt->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(wdt->base)) {
ret = PTR_ERR(wdt->base);
goto err_iomap;