提交 ba647456 编写于 作者: S Sergio Paracuellos 提交者: Greg Kroah-Hartman

staging: mt7621-gpio: use module_platform_driver() instead subsys initcall

The driver's init function don't do anything besides registering the platform
driver, and the exit function which is not included in the driver should only
do driver unregister. Because of this module_platform_driver() macro could
just be used instead of having separate functions.

Currently the macro is not being used because the driver is initialized at
subsys init call level but this isn't necessary since platform devices are
defined in the DT as dependencies so there's no need for init calls order.
Signed-off-by: NSergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: NNeilBrown <neil@brown.name>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 e84ff3a2
......@@ -379,10 +379,4 @@ static struct platform_driver mediatek_gpio_driver = {
},
};
static int __init
mediatek_gpio_init(void)
{
return platform_driver_register(&mediatek_gpio_driver);
}
subsys_initcall(mediatek_gpio_init);
module_platform_driver(mediatek_gpio_driver);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册