pinctrl: uniphier: Use devm_pinctrl_register() for pinctrl registration
authorLaxman Dewangan <ldewangan@nvidia.com>
Wed, 24 Feb 2016 09:14:07 +0000 (14:44 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 20 Apr 2016 22:03:35 +0000 (00:03 +0200)
Use devm_pinctrl_register() for pin control registration and remove
need of .remove callback.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/uniphier/pinctrl-uniphier-core.c
drivers/pinctrl/uniphier/pinctrl-uniphier-ld4.c
drivers/pinctrl/uniphier/pinctrl-uniphier-ld6b.c
drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
drivers/pinctrl/uniphier/pinctrl-uniphier-pro5.c
drivers/pinctrl/uniphier/pinctrl-uniphier-pxs2.c
drivers/pinctrl/uniphier/pinctrl-uniphier-sld8.c
drivers/pinctrl/uniphier/pinctrl-uniphier.h

index c9e4a852afa58b912f9c60422e1195df9f961dd6..967400971d4554a05adf82a8e2a0b65168a2b22c 100644 (file)
@@ -665,7 +665,7 @@ int uniphier_pinctrl_probe(struct platform_device *pdev,
        desc->pmxops = &uniphier_pmxops;
        desc->confops = &uniphier_confops;
 
-       priv->pctldev = pinctrl_register(desc, dev, priv);
+       priv->pctldev = devm_pinctrl_register(dev, desc, priv);
        if (IS_ERR(priv->pctldev)) {
                dev_err(dev, "failed to register UniPhier pinctrl driver\n");
                return PTR_ERR(priv->pctldev);
@@ -676,13 +676,3 @@ int uniphier_pinctrl_probe(struct platform_device *pdev,
        return 0;
 }
 EXPORT_SYMBOL_GPL(uniphier_pinctrl_probe);
-
-int uniphier_pinctrl_remove(struct platform_device *pdev)
-{
-       struct uniphier_pinctrl_priv *priv = platform_get_drvdata(pdev);
-
-       pinctrl_unregister(priv->pctldev);
-
-       return 0;
-}
-EXPORT_SYMBOL_GPL(uniphier_pinctrl_remove);
index a7056dccfa5385a9854e475cc538a5642636f8dd..4a0439c80aa0b6891ab0c710efa6c11651b808bc 100644 (file)
@@ -878,7 +878,6 @@ MODULE_DEVICE_TABLE(of, ph1_ld4_pinctrl_match);
 
 static struct platform_driver ph1_ld4_pinctrl_driver = {
        .probe = ph1_ld4_pinctrl_probe,
-       .remove = uniphier_pinctrl_remove,
        .driver = {
                .name = DRIVER_NAME,
                .of_match_table = ph1_ld4_pinctrl_match,
index 1824831bb4da6d7fc5d0d4a01b5a909130954ad7..150d33928df2796e977dc97fd2730bb4778ff3d3 100644 (file)
@@ -1266,7 +1266,6 @@ MODULE_DEVICE_TABLE(of, ph1_ld6b_pinctrl_match);
 
 static struct platform_driver ph1_ld6b_pinctrl_driver = {
        .probe = ph1_ld6b_pinctrl_probe,
-       .remove = uniphier_pinctrl_remove,
        .driver = {
                .name = DRIVER_NAME,
                .of_match_table = ph1_ld6b_pinctrl_match,
index ec8e92dfaf8c71394a658ec519856e72bc57f3ce..b1f09e68f90e6aa234e244cecd3d227ad7ca8361 100644 (file)
@@ -1552,7 +1552,6 @@ MODULE_DEVICE_TABLE(of, ph1_pro4_pinctrl_match);
 
 static struct platform_driver ph1_pro4_pinctrl_driver = {
        .probe = ph1_pro4_pinctrl_probe,
-       .remove = uniphier_pinctrl_remove,
        .driver = {
                .name = DRIVER_NAME,
                .of_match_table = ph1_pro4_pinctrl_match,
index e3d648eae85afe0e9f2a1022ada182b182557e53..3087f76752a6c969de496c9ac1daf9daa366c9d4 100644 (file)
@@ -1343,7 +1343,6 @@ MODULE_DEVICE_TABLE(of, ph1_pro5_pinctrl_match);
 
 static struct platform_driver ph1_pro5_pinctrl_driver = {
        .probe = ph1_pro5_pinctrl_probe,
-       .remove = uniphier_pinctrl_remove,
        .driver = {
                .name = DRIVER_NAME,
                .of_match_table = ph1_pro5_pinctrl_match,
index bc00d7591c59b019ba77d55ae1fcd5c46f2e95d9..e868030ff31c3543d6ab6a31b9bcb6454a7a2a71 100644 (file)
@@ -1261,7 +1261,6 @@ MODULE_DEVICE_TABLE(of, proxstream2_pinctrl_match);
 
 static struct platform_driver proxstream2_pinctrl_driver = {
        .probe = proxstream2_pinctrl_probe,
-       .remove = uniphier_pinctrl_remove,
        .driver = {
                .name = DRIVER_NAME,
                .of_match_table = proxstream2_pinctrl_match,
index c3700a33a5da406541c3e3415ae075bedebd8cf2..ceb7a9899bde310739a0b52c149f94d6b20a1556 100644 (file)
@@ -786,7 +786,6 @@ MODULE_DEVICE_TABLE(of, ph1_sld8_pinctrl_match);
 
 static struct platform_driver ph1_sld8_pinctrl_driver = {
        .probe = ph1_sld8_pinctrl_probe,
-       .remove = uniphier_pinctrl_remove,
        .driver = {
                .name = DRIVER_NAME,
                .of_match_table = ph1_sld8_pinctrl_match,
index e1e98b868be5018dc115c2a847b3955d6cb5db44..a21154f4b453334d80796b892b770d795aab731d 100644 (file)
@@ -212,6 +212,4 @@ int uniphier_pinctrl_probe(struct platform_device *pdev,
                           struct pinctrl_desc *desc,
                           struct uniphier_pinctrl_socdata *socdata);
 
-int uniphier_pinctrl_remove(struct platform_device *pdev);
-
 #endif /* __PINCTRL_UNIPHIER_H__ */