Skip to content

Commit 54ccba2

Browse files
caihuoqing1990Wim Van Sebroeck
authored andcommitted
watchdog: ar7_wdt: Make use of the helper function devm_platform_ioremap_resource_byname()
Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() 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 94213a3 commit 54ccba2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/watchdog/ar7_wdt.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ static DEFINE_SPINLOCK(wdt_lock);
6363
/* XXX currently fixed, allows max margin ~68.72 secs */
6464
#define prescale_value 0xffff
6565

66-
/* Resource of the WDT registers */
67-
static struct resource *ar7_regs_wdt;
6866
/* Pointer to the remapped WDT IO space */
6967
static struct ar7_wdt *ar7_wdt;
7068

@@ -265,9 +263,7 @@ static int ar7_wdt_probe(struct platform_device *pdev)
265263
{
266264
int rc;
267265

268-
ar7_regs_wdt =
269-
platform_get_resource_byname(pdev, IORESOURCE_MEM, "regs");
270-
ar7_wdt = devm_ioremap_resource(&pdev->dev, ar7_regs_wdt);
266+
ar7_wdt = devm_platform_ioremap_resource_byname(pdev, "regs");
271267
if (IS_ERR(ar7_wdt))
272268
return PTR_ERR(ar7_wdt);
273269

0 commit comments

Comments
 (0)