Skip to content

Commit

Permalink
watchdog: mv64x60_wdt: use devm_ioremap()
Browse files Browse the repository at this point in the history
Use devm_ioremap() to make cleanup paths simpler.

Signed-off-by: Jingoo Han <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: Wim Van Sebroeck <[email protected]>
  • Loading branch information
Jingoo Han authored and Wim Van Sebroeck committed Jul 11, 2013
1 parent 626d65a commit ac1bb69
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/watchdog/mv64x60_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ static int mv64x60_wdt_probe(struct platform_device *dev)
if (!r)
return -ENODEV;

mv64x60_wdt_regs = ioremap(r->start, resource_size(r));
mv64x60_wdt_regs = devm_ioremap(&dev->dev, r->start, resource_size(r));
if (mv64x60_wdt_regs == NULL)
return -ENOMEM;

Expand All @@ -293,8 +293,6 @@ static int mv64x60_wdt_remove(struct platform_device *dev)

mv64x60_wdt_handler_disable();

iounmap(mv64x60_wdt_regs);

return 0;
}

Expand Down

0 comments on commit ac1bb69

Please sign in to comment.