@@ -372,18 +372,7 @@ static struct platform_driver stmpe_gpio_driver = {
.probe = stmpe_gpio_probe,
.remove = stmpe_gpio_remove,
};
-
-static int __init stmpe_gpio_init(void)
-{
- return platform_driver_register(&stmpe_gpio_driver);
-}
-subsys_initcall(stmpe_gpio_init);
-
-static void __exit stmpe_gpio_exit(void)
-{
- platform_driver_unregister(&stmpe_gpio_driver);
-}
-module_exit(stmpe_gpio_exit);
+module_platform_driver(stmpe_gpio_driver);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("STMPExxxx GPIO driver");