mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
pinctrl: imx: Use devm_pinctrl_register() for pinctrl registration
Use devm_pinctrl_register() for pin control registration and remove need of .remove callback. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Stefan Agner <stefan@agner.ch> Cc: Adrian Alonso <aalonso@freescale.com> Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
7e73f81905
commit
a4b0f4571c
@ -790,7 +790,7 @@ int imx_pinctrl_probe(struct platform_device *pdev,
|
||||
ipctl->info = info;
|
||||
ipctl->dev = info->dev;
|
||||
platform_set_drvdata(pdev, ipctl);
|
||||
ipctl->pctl = pinctrl_register(&imx_pinctrl_desc, &pdev->dev, ipctl);
|
||||
ipctl->pctl = devm_pinctrl_register(&pdev->dev, &imx_pinctrl_desc, ipctl);
|
||||
if (IS_ERR(ipctl->pctl)) {
|
||||
dev_err(&pdev->dev, "could not register IMX pinctrl driver\n");
|
||||
return PTR_ERR(ipctl->pctl);
|
||||
@ -800,12 +800,3 @@ int imx_pinctrl_probe(struct platform_device *pdev,
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int imx_pinctrl_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct imx_pinctrl *ipctl = platform_get_drvdata(pdev);
|
||||
|
||||
pinctrl_unregister(ipctl->pctl);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -99,5 +99,4 @@ struct imx_pinctrl_soc_info {
|
||||
|
||||
int imx_pinctrl_probe(struct platform_device *pdev,
|
||||
struct imx_pinctrl_soc_info *info);
|
||||
int imx_pinctrl_remove(struct platform_device *pdev);
|
||||
#endif /* __DRIVERS_PINCTRL_IMX_H */
|
||||
|
@ -331,7 +331,6 @@ static struct platform_driver imx25_pinctrl_driver = {
|
||||
.of_match_table = of_match_ptr(imx25_pinctrl_of_match),
|
||||
},
|
||||
.probe = imx25_pinctrl_probe,
|
||||
.remove = imx_pinctrl_remove,
|
||||
};
|
||||
|
||||
static int __init imx25_pinctrl_init(void)
|
||||
|
@ -1021,7 +1021,6 @@ static struct platform_driver imx35_pinctrl_driver = {
|
||||
.of_match_table = imx35_pinctrl_of_match,
|
||||
},
|
||||
.probe = imx35_pinctrl_probe,
|
||||
.remove = imx_pinctrl_remove,
|
||||
};
|
||||
|
||||
static int __init imx35_pinctrl_init(void)
|
||||
|
@ -408,7 +408,6 @@ static struct platform_driver imx50_pinctrl_driver = {
|
||||
.of_match_table = of_match_ptr(imx50_pinctrl_of_match),
|
||||
},
|
||||
.probe = imx50_pinctrl_probe,
|
||||
.remove = imx_pinctrl_remove,
|
||||
};
|
||||
|
||||
static int __init imx50_pinctrl_init(void)
|
||||
|
@ -784,7 +784,6 @@ static struct platform_driver imx51_pinctrl_driver = {
|
||||
.of_match_table = imx51_pinctrl_of_match,
|
||||
},
|
||||
.probe = imx51_pinctrl_probe,
|
||||
.remove = imx_pinctrl_remove,
|
||||
};
|
||||
|
||||
static int __init imx51_pinctrl_init(void)
|
||||
|
@ -471,7 +471,6 @@ static struct platform_driver imx53_pinctrl_driver = {
|
||||
.of_match_table = imx53_pinctrl_of_match,
|
||||
},
|
||||
.probe = imx53_pinctrl_probe,
|
||||
.remove = imx_pinctrl_remove,
|
||||
};
|
||||
|
||||
static int __init imx53_pinctrl_init(void)
|
||||
|
@ -477,7 +477,6 @@ static struct platform_driver imx6dl_pinctrl_driver = {
|
||||
.of_match_table = imx6dl_pinctrl_of_match,
|
||||
},
|
||||
.probe = imx6dl_pinctrl_probe,
|
||||
.remove = imx_pinctrl_remove,
|
||||
};
|
||||
|
||||
static int __init imx6dl_pinctrl_init(void)
|
||||
|
@ -483,7 +483,6 @@ static struct platform_driver imx6q_pinctrl_driver = {
|
||||
.of_match_table = imx6q_pinctrl_of_match,
|
||||
},
|
||||
.probe = imx6q_pinctrl_probe,
|
||||
.remove = imx_pinctrl_remove,
|
||||
};
|
||||
|
||||
static int __init imx6q_pinctrl_init(void)
|
||||
|
@ -384,7 +384,6 @@ static struct platform_driver imx6sl_pinctrl_driver = {
|
||||
.of_match_table = imx6sl_pinctrl_of_match,
|
||||
},
|
||||
.probe = imx6sl_pinctrl_probe,
|
||||
.remove = imx_pinctrl_remove,
|
||||
};
|
||||
|
||||
static int __init imx6sl_pinctrl_init(void)
|
||||
|
@ -387,7 +387,6 @@ static struct platform_driver imx6sx_pinctrl_driver = {
|
||||
.of_match_table = of_match_ptr(imx6sx_pinctrl_of_match),
|
||||
},
|
||||
.probe = imx6sx_pinctrl_probe,
|
||||
.remove = imx_pinctrl_remove,
|
||||
};
|
||||
|
||||
static int __init imx6sx_pinctrl_init(void)
|
||||
|
@ -303,7 +303,6 @@ static struct platform_driver imx6ul_pinctrl_driver = {
|
||||
.of_match_table = of_match_ptr(imx6ul_pinctrl_of_match),
|
||||
},
|
||||
.probe = imx6ul_pinctrl_probe,
|
||||
.remove = imx_pinctrl_remove,
|
||||
};
|
||||
|
||||
static int __init imx6ul_pinctrl_init(void)
|
||||
|
@ -395,7 +395,6 @@ static struct platform_driver imx7d_pinctrl_driver = {
|
||||
.of_match_table = of_match_ptr(imx7d_pinctrl_of_match),
|
||||
},
|
||||
.probe = imx7d_pinctrl_probe,
|
||||
.remove = imx_pinctrl_remove,
|
||||
};
|
||||
|
||||
static int __init imx7d_pinctrl_init(void)
|
||||
|
@ -318,7 +318,6 @@ static struct platform_driver vf610_pinctrl_driver = {
|
||||
.of_match_table = vf610_pinctrl_of_match,
|
||||
},
|
||||
.probe = vf610_pinctrl_probe,
|
||||
.remove = imx_pinctrl_remove,
|
||||
};
|
||||
|
||||
static int __init vf610_pinctrl_init(void)
|
||||
|
Loading…
Reference in New Issue
Block a user