Skip to content

Commit b3220bd

Browse files
caihuoqing1990Wim Van Sebroeck
authored andcommitted
watchdog: rti-wdt: Make use of the helper function devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent 79cc4d2 commit b3220bd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/watchdog/rti_wdt.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ static int rti_wdt_probe(struct platform_device *pdev)
194194
{
195195
int ret = 0;
196196
struct device *dev = &pdev->dev;
197-
struct resource *wdt_mem;
198197
struct watchdog_device *wdd;
199198
struct rti_wdt_device *wdt;
200199
struct clk *clk;
@@ -246,8 +245,7 @@ static int rti_wdt_probe(struct platform_device *pdev)
246245
watchdog_set_nowayout(wdd, 1);
247246
watchdog_set_restart_priority(wdd, 128);
248247

249-
wdt_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
250-
wdt->base = devm_ioremap_resource(dev, wdt_mem);
248+
wdt->base = devm_platform_ioremap_resource(pdev, 0);
251249
if (IS_ERR(wdt->base)) {
252250
ret = PTR_ERR(wdt->base);
253251
goto err_iomap;

0 commit comments

Comments
 (0)