pinctrl: sprd: use module_platform_driver to simplify the code
module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Acked-by: Chunyan Zhang <zhang.lyra@gmail.com> Link: https://lore.kernel.org/r/20200914065402.3726408-1-liushixin2@huawei.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Родитель
f4b5c348d6
Коммит
da2ab12f99
|
@ -946,18 +946,7 @@ static struct platform_driver sprd_pinctrl_driver = {
|
|||
.remove = sprd_pinctrl_remove,
|
||||
.shutdown = sprd_pinctrl_shutdown,
|
||||
};
|
||||
|
||||
static int sprd_pinctrl_init(void)
|
||||
{
|
||||
return platform_driver_register(&sprd_pinctrl_driver);
|
||||
}
|
||||
module_init(sprd_pinctrl_init);
|
||||
|
||||
static void sprd_pinctrl_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&sprd_pinctrl_driver);
|
||||
}
|
||||
module_exit(sprd_pinctrl_exit);
|
||||
module_platform_driver(sprd_pinctrl_driver);
|
||||
|
||||
MODULE_DESCRIPTION("SPREADTRUM Pin Controller Driver");
|
||||
MODULE_AUTHOR("Baolin Wang <baolin.wang@spreadtrum.com>");
|
||||
|
|
Загрузка…
Ссылка в новой задаче