@@ -129,18 +129,7 @@ static struct platform_driver tps65912_gpio_driver = {
.probe = tps65912_gpio_probe,
.remove = tps65912_gpio_remove,
};
-
-static int __init tps65912_gpio_init(void)
-{
- return platform_driver_register(&tps65912_gpio_driver);
-}
-subsys_initcall(tps65912_gpio_init);
-
-static void __exit tps65912_gpio_exit(void)
-{
- platform_driver_unregister(&tps65912_gpio_driver);
-}
-module_exit(tps65912_gpio_exit);
+module_platform_driver(tps65912_gpio_driver);
MODULE_AUTHOR("Margarita Olaya Cabrera <magi@slimlogic.co.uk>");
MODULE_DESCRIPTION("GPIO interface for TPS65912 PMICs");