Commit 1ac471ed authored by Laxman Dewangan's avatar Laxman Dewangan Committed by Linus Walleij

pinctrl: uniphier: Use devm_pinctrl_register() for pinctrl registration

Use devm_pinctrl_register() for pin control registration and remove
need of .remove callback.
Signed-off-by: default avatarLaxman Dewangan <ldewangan@nvidia.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent e46e3ef3
...@@ -665,7 +665,7 @@ int uniphier_pinctrl_probe(struct platform_device *pdev, ...@@ -665,7 +665,7 @@ int uniphier_pinctrl_probe(struct platform_device *pdev,
desc->pmxops = &uniphier_pmxops; desc->pmxops = &uniphier_pmxops;
desc->confops = &uniphier_confops; desc->confops = &uniphier_confops;
priv->pctldev = pinctrl_register(desc, dev, priv); priv->pctldev = devm_pinctrl_register(dev, desc, priv);
if (IS_ERR(priv->pctldev)) { if (IS_ERR(priv->pctldev)) {
dev_err(dev, "failed to register UniPhier pinctrl driver\n"); dev_err(dev, "failed to register UniPhier pinctrl driver\n");
return PTR_ERR(priv->pctldev); return PTR_ERR(priv->pctldev);
...@@ -676,13 +676,3 @@ int uniphier_pinctrl_probe(struct platform_device *pdev, ...@@ -676,13 +676,3 @@ int uniphier_pinctrl_probe(struct platform_device *pdev,
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(uniphier_pinctrl_probe); 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);
...@@ -878,7 +878,6 @@ MODULE_DEVICE_TABLE(of, ph1_ld4_pinctrl_match); ...@@ -878,7 +878,6 @@ MODULE_DEVICE_TABLE(of, ph1_ld4_pinctrl_match);
static struct platform_driver ph1_ld4_pinctrl_driver = { static struct platform_driver ph1_ld4_pinctrl_driver = {
.probe = ph1_ld4_pinctrl_probe, .probe = ph1_ld4_pinctrl_probe,
.remove = uniphier_pinctrl_remove,
.driver = { .driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
.of_match_table = ph1_ld4_pinctrl_match, .of_match_table = ph1_ld4_pinctrl_match,
......
...@@ -1266,7 +1266,6 @@ MODULE_DEVICE_TABLE(of, ph1_ld6b_pinctrl_match); ...@@ -1266,7 +1266,6 @@ MODULE_DEVICE_TABLE(of, ph1_ld6b_pinctrl_match);
static struct platform_driver ph1_ld6b_pinctrl_driver = { static struct platform_driver ph1_ld6b_pinctrl_driver = {
.probe = ph1_ld6b_pinctrl_probe, .probe = ph1_ld6b_pinctrl_probe,
.remove = uniphier_pinctrl_remove,
.driver = { .driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
.of_match_table = ph1_ld6b_pinctrl_match, .of_match_table = ph1_ld6b_pinctrl_match,
......
...@@ -1552,7 +1552,6 @@ MODULE_DEVICE_TABLE(of, ph1_pro4_pinctrl_match); ...@@ -1552,7 +1552,6 @@ MODULE_DEVICE_TABLE(of, ph1_pro4_pinctrl_match);
static struct platform_driver ph1_pro4_pinctrl_driver = { static struct platform_driver ph1_pro4_pinctrl_driver = {
.probe = ph1_pro4_pinctrl_probe, .probe = ph1_pro4_pinctrl_probe,
.remove = uniphier_pinctrl_remove,
.driver = { .driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
.of_match_table = ph1_pro4_pinctrl_match, .of_match_table = ph1_pro4_pinctrl_match,
......
...@@ -1343,7 +1343,6 @@ MODULE_DEVICE_TABLE(of, ph1_pro5_pinctrl_match); ...@@ -1343,7 +1343,6 @@ MODULE_DEVICE_TABLE(of, ph1_pro5_pinctrl_match);
static struct platform_driver ph1_pro5_pinctrl_driver = { static struct platform_driver ph1_pro5_pinctrl_driver = {
.probe = ph1_pro5_pinctrl_probe, .probe = ph1_pro5_pinctrl_probe,
.remove = uniphier_pinctrl_remove,
.driver = { .driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
.of_match_table = ph1_pro5_pinctrl_match, .of_match_table = ph1_pro5_pinctrl_match,
......
...@@ -1261,7 +1261,6 @@ MODULE_DEVICE_TABLE(of, proxstream2_pinctrl_match); ...@@ -1261,7 +1261,6 @@ MODULE_DEVICE_TABLE(of, proxstream2_pinctrl_match);
static struct platform_driver proxstream2_pinctrl_driver = { static struct platform_driver proxstream2_pinctrl_driver = {
.probe = proxstream2_pinctrl_probe, .probe = proxstream2_pinctrl_probe,
.remove = uniphier_pinctrl_remove,
.driver = { .driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
.of_match_table = proxstream2_pinctrl_match, .of_match_table = proxstream2_pinctrl_match,
......
...@@ -786,7 +786,6 @@ MODULE_DEVICE_TABLE(of, ph1_sld8_pinctrl_match); ...@@ -786,7 +786,6 @@ MODULE_DEVICE_TABLE(of, ph1_sld8_pinctrl_match);
static struct platform_driver ph1_sld8_pinctrl_driver = { static struct platform_driver ph1_sld8_pinctrl_driver = {
.probe = ph1_sld8_pinctrl_probe, .probe = ph1_sld8_pinctrl_probe,
.remove = uniphier_pinctrl_remove,
.driver = { .driver = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
.of_match_table = ph1_sld8_pinctrl_match, .of_match_table = ph1_sld8_pinctrl_match,
......
...@@ -212,6 +212,4 @@ int uniphier_pinctrl_probe(struct platform_device *pdev, ...@@ -212,6 +212,4 @@ int uniphier_pinctrl_probe(struct platform_device *pdev,
struct pinctrl_desc *desc, struct pinctrl_desc *desc,
struct uniphier_pinctrl_socdata *socdata); struct uniphier_pinctrl_socdata *socdata);
int uniphier_pinctrl_remove(struct platform_device *pdev);
#endif /* __PINCTRL_UNIPHIER_H__ */ #endif /* __PINCTRL_UNIPHIER_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment