module_platform_driver() makes the code simpler by eliminating
boilerplate code.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
.driver = { .name = "ion-tegra" }
};
.driver = { .name = "ion-tegra" }
};
-static int __init ion_init(void)
-{
- return platform_driver_register(&ion_driver);
-}
-
-static void __exit ion_exit(void)
-{
- platform_driver_unregister(&ion_driver);
-}
-
-module_init(ion_init);
-module_exit(ion_exit);
+module_platform_driver(ion_driver);