Skip to content

Commit

Permalink
pinctrl: berlin: bg4ct: Use devm_platform_*ioremap_resource() APIs
Browse files Browse the repository at this point in the history
Use devm_platform_get_and_ioremap_resource() and
devm_platform_ioremap_resource() APIs instead of their
open coded analogues.

Signed-off-by: zhaoxiao <zhaoxiao@uniontech.com>
Link: https://lore.kernel.org/r/20220520052021.25631-1-zhaoxiao@uniontech.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
zhaoxiao authored and Linus Walleij committed May 22, 2022
1 parent 933adeb commit 80a5046
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/pinctrl/berlin/berlin-bg4ct.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,7 @@ static int berlin4ct_pinctrl_probe(struct platform_device *pdev)
if (!rmconfig)
return -ENOMEM;

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
base = devm_ioremap_resource(&pdev->dev, res);
base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(base))
return PTR_ERR(base);

Expand Down

0 comments on commit 80a5046

Please sign in to comment.