gpio: Convert GPIO drivers to module_platform_driver
Where appropriate factor out some boilerplate code for platform device registration into module_platform_driver. Drivers that don't use the standard module_init initcall haven't been converted. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
@@ -259,17 +259,7 @@ static struct platform_driver da9052_gpio_driver = {
|
||||
},
|
||||
};
|
||||
|
||||
static int __init da9052_gpio_init(void)
|
||||
{
|
||||
return platform_driver_register(&da9052_gpio_driver);
|
||||
}
|
||||
module_init(da9052_gpio_init);
|
||||
|
||||
static void __exit da9052_gpio_exit(void)
|
||||
{
|
||||
return platform_driver_unregister(&da9052_gpio_driver);
|
||||
}
|
||||
module_exit(da9052_gpio_exit);
|
||||
module_platform_driver(da9052_gpio_driver);
|
||||
|
||||
MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>");
|
||||
MODULE_DESCRIPTION("DA9052 GPIO Device Driver");
|
||||
|
Reference in New Issue
Block a user