Skip to content

Commit

Permalink
pinctrl: lpc18xx: Use devm_pinctrl_register() for pinctrl registration
Browse files Browse the repository at this point in the history
Use devm_pinctrl_register() for pin control registration.

Signed-off-by: Laxman Dewangan <[email protected]>
Cc: Joachim Eastwood <[email protected]>
Acked-by: Joachim Eastwood <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
  • Loading branch information
ldewangan authored and linusw committed Apr 21, 2016
1 parent 280132d commit 19ba900
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/pinctrl/pinctrl-lpc18xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1355,7 +1355,7 @@ static int lpc18xx_scu_probe(struct platform_device *pdev)

platform_set_drvdata(pdev, scu);

scu->pctl = pinctrl_register(&lpc18xx_scu_desc, &pdev->dev, scu);
scu->pctl = devm_pinctrl_register(&pdev->dev, &lpc18xx_scu_desc, scu);
if (IS_ERR(scu->pctl)) {
dev_err(&pdev->dev, "Could not register pinctrl driver\n");
clk_disable_unprepare(scu->clk);
Expand All @@ -1369,7 +1369,6 @@ static int lpc18xx_scu_remove(struct platform_device *pdev)
{
struct lpc18xx_scu_data *scu = platform_get_drvdata(pdev);

pinctrl_unregister(scu->pctl);
clk_disable_unprepare(scu->clk);

return 0;
Expand Down

0 comments on commit 19ba900

Please sign in to comment.