Skip to content

Commit

Permalink
mfd: ipaq-micro: Use devm_platform_ioremap_resource() in micro_probe()
Browse files Browse the repository at this point in the history
Simplify this function implementation by using a known wrapper function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
  • Loading branch information
elfring authored and Lee Jones committed Nov 11, 2019
1 parent eeb86ed commit f20781e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/mfd/ipaq-micro.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,11 +396,7 @@ static int __init micro_probe(struct platform_device *pdev)
if (IS_ERR(micro->base))
return PTR_ERR(micro->base);

res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
if (!res)
return -EINVAL;

micro->sdlc = devm_ioremap_resource(&pdev->dev, res);
micro->sdlc = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(micro->sdlc))
return PTR_ERR(micro->sdlc);

Expand Down

0 comments on commit f20781e

Please sign in to comment.