diff mbox

[08/50] pinctrl: berlin: Use devm_pinctrl_register() for pinctrl registration

Message ID 1456319775-3216-9-git-send-email-ldewangan@nvidia.com (mailing list archive)
State New, archived
Headers show

Commit Message

Laxman Dewangan Feb. 24, 2016, 1:15 p.m. UTC
Use devm_pinctrl_register() for pin control registration.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Antoine Ténart <antoine.tenart@free-electrons.com>
---
 drivers/pinctrl/berlin/berlin.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Antoine Tenart Feb. 24, 2016, 5:28 p.m. UTC | #1
Hello,

On Wed, Feb 24, 2016 at 06:45:33PM +0530, Laxman Dewangan wrote:
> Use devm_pinctrl_register() for pin control registration.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>

Acked-by: Antoine Tenart <antoine.tenart@free-electrons.com>

Thanks!

Antoine

> Cc: Antoine Ténart <antoine.tenart@free-electrons.com>
> ---
>  drivers/pinctrl/berlin/berlin.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/berlin/berlin.c b/drivers/pinctrl/berlin/berlin.c
> index 46f2b48..2d58166 100644
> --- a/drivers/pinctrl/berlin/berlin.c
> +++ b/drivers/pinctrl/berlin/berlin.c
> @@ -316,7 +316,8 @@ int berlin_pinctrl_probe_regmap(struct platform_device *pdev,
>  		return ret;
>  	}
>  
> -	pctrl->pctrl_dev = pinctrl_register(&berlin_pctrl_desc, dev, pctrl);
> +	pctrl->pctrl_dev = devm_pinctrl_register(dev, &berlin_pctrl_desc,
> +						 pctrl);
>  	if (IS_ERR(pctrl->pctrl_dev)) {
>  		dev_err(dev, "failed to register pinctrl driver\n");
>  		return PTR_ERR(pctrl->pctrl_dev);
> -- 
> 2.1.4
>
diff mbox

Patch

diff --git a/drivers/pinctrl/berlin/berlin.c b/drivers/pinctrl/berlin/berlin.c
index 46f2b48..2d58166 100644
--- a/drivers/pinctrl/berlin/berlin.c
+++ b/drivers/pinctrl/berlin/berlin.c
@@ -316,7 +316,8 @@  int berlin_pinctrl_probe_regmap(struct platform_device *pdev,
 		return ret;
 	}
 
-	pctrl->pctrl_dev = pinctrl_register(&berlin_pctrl_desc, dev, pctrl);
+	pctrl->pctrl_dev = devm_pinctrl_register(dev, &berlin_pctrl_desc,
+						 pctrl);
 	if (IS_ERR(pctrl->pctrl_dev)) {
 		dev_err(dev, "failed to register pinctrl driver\n");
 		return PTR_ERR(pctrl->pctrl_dev);