diff options
author | Rosen Penev <rosenp@gmail.com> | 2024-10-03 23:45:08 +0200 |
---|---|---|
committer | Wim Van Sebroeck <wim@linux-watchdog.org> | 2024-11-04 13:13:03 +0100 |
commit | 06ba0b8da1daabaf10dbec4c04e883d7a6c81706 (patch) | |
tree | 84250176754785ff3feb8d608fdb37091b4d297f /drivers/watchdog | |
parent | watchdog: apple: Increase reset delay to 150ms (diff) | |
download | linux-06ba0b8da1daabaf10dbec4c04e883d7a6c81706.tar.xz linux-06ba0b8da1daabaf10dbec4c04e883d7a6c81706.zip |
watchdog: armada_37xx_wdt: remove struct resource
No need for it with devm_platform_ioremap_resource. Simplifies probe
slightly.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Marek BehĂșn <kabel@kernel.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20241003214508.121107-1-rosenp@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Diffstat (limited to 'drivers/watchdog')
-rw-r--r-- | drivers/watchdog/armada_37xx_wdt.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/watchdog/armada_37xx_wdt.c b/drivers/watchdog/armada_37xx_wdt.c index 8133a5d05647..a17a7911771a 100644 --- a/drivers/watchdog/armada_37xx_wdt.c +++ b/drivers/watchdog/armada_37xx_wdt.c @@ -248,7 +248,6 @@ static const struct watchdog_ops armada_37xx_wdt_ops = { static int armada_37xx_wdt_probe(struct platform_device *pdev) { struct armada_37xx_watchdog *dev; - struct resource *res; struct regmap *regmap; int ret; @@ -266,12 +265,9 @@ static int armada_37xx_wdt_probe(struct platform_device *pdev) return PTR_ERR(regmap); dev->cpu_misc = regmap; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - dev->reg = devm_ioremap(&pdev->dev, res->start, resource_size(res)); - if (!dev->reg) - return -ENOMEM; + dev->reg = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(dev->reg)) + return PTR_ERR(dev->reg); /* init clock */ dev->clk = devm_clk_get_enabled(&pdev->dev, NULL); |