Skip to content

Commit 79cc4d2

Browse files
caihuoqing1990Wim Van Sebroeck
authored andcommitted
watchdog: iTCO_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 54ccba2 commit 79cc4d2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/watchdog/iTCO_wdt.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ struct iTCO_wdt_private {
9494
* NO_REBOOT flag is Memory-Mapped GCS register bit 5 (TCO version 2),
9595
* or memory-mapped PMC register bit 4 (TCO version 3).
9696
*/
97-
struct resource *gcs_pmc_res;
9897
unsigned long __iomem *gcs_pmc;
9998
/* the lock for io operations */
10099
spinlock_t io_lock;
@@ -497,10 +496,7 @@ static int iTCO_wdt_probe(struct platform_device *pdev)
497496
*/
498497
if (p->iTCO_version >= 2 && p->iTCO_version < 6 &&
499498
!pdata->no_reboot_use_pmc) {
500-
p->gcs_pmc_res = platform_get_resource(pdev,
501-
IORESOURCE_MEM,
502-
ICH_RES_MEM_GCS_PMC);
503-
p->gcs_pmc = devm_ioremap_resource(dev, p->gcs_pmc_res);
499+
p->gcs_pmc = devm_platform_ioremap_resource(pdev, ICH_RES_MEM_GCS_PMC);
504500
if (IS_ERR(p->gcs_pmc))
505501
return PTR_ERR(p->gcs_pmc);
506502
}

0 commit comments

Comments
 (0)