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:
@@ -524,17 +524,7 @@ static struct platform_driver bgpio_driver = {
|
||||
.remove = __devexit_p(bgpio_pdev_remove),
|
||||
};
|
||||
|
||||
static int __init bgpio_platform_init(void)
|
||||
{
|
||||
return platform_driver_register(&bgpio_driver);
|
||||
}
|
||||
module_init(bgpio_platform_init);
|
||||
|
||||
static void __exit bgpio_platform_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&bgpio_driver);
|
||||
}
|
||||
module_exit(bgpio_platform_exit);
|
||||
module_platform_driver(bgpio_driver);
|
||||
|
||||
#endif /* CONFIG_GPIO_GENERIC_PLATFORM */
|
||||
|
||||
|
Reference in New Issue
Block a user