summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog/stm32_iwdg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog/stm32_iwdg.c')
-rw-r--r--drivers/watchdog/stm32_iwdg.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/watchdog/stm32_iwdg.c b/drivers/watchdog/stm32_iwdg.c
index e00e3b3526c6..309563e002b8 100644
--- a/drivers/watchdog/stm32_iwdg.c
+++ b/drivers/watchdog/stm32_iwdg.c
@@ -202,7 +202,6 @@ static int stm32_iwdg_probe(struct platform_device *pdev)
struct watchdog_device *wdd;
const struct of_device_id *match;
struct stm32_iwdg *wdt;
- struct resource *res;
int ret;
match = of_match_device(stm32_iwdg_of_match, &pdev->dev);
@@ -216,8 +215,7 @@ static int stm32_iwdg_probe(struct platform_device *pdev)
wdt->has_pclk = match->data;
/* This is the timer base. */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- wdt->regs = devm_ioremap_resource(&pdev->dev, res);
+ wdt->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(wdt->regs)) {
dev_err(&pdev->dev, "Could not get resource\n");
return PTR_ERR(wdt->regs);