Skip to content

Commit

Permalink
pinctrl: tb10x: 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]>
Signed-off-by: Linus Walleij <[email protected]>
  • Loading branch information
ldewangan authored and linusw committed Apr 21, 2016
1 parent e8e2cb2 commit c3a6d9e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/pinctrl/pinctrl-tb10x.c
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ static int tb10x_pinctrl_probe(struct platform_device *pdev)
}
}

state->pctl = pinctrl_register(&tb10x_pindesc, dev, state);
state->pctl = devm_pinctrl_register(dev, &tb10x_pindesc, state);
if (IS_ERR(state->pctl)) {
dev_err(dev, "could not register TB10x pin driver\n");
ret = PTR_ERR(state->pctl);
Expand All @@ -824,7 +824,6 @@ static int tb10x_pinctrl_remove(struct platform_device *pdev)
{
struct tb10x_pinctrl *state = platform_get_drvdata(pdev);

pinctrl_unregister(state->pctl);
mutex_destroy(&state->mutex);

return 0;
Expand Down

0 comments on commit c3a6d9e

Please sign in to comment.