]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
gpu: ion: use module_platform_driver to simplify the code
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 17 Dec 2013 03:16:41 +0000 (11:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Dec 2013 03:25:31 +0000 (19:25 -0800)
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>
drivers/staging/android/ion/tegra/tegra_ion.c

index 0849600bcc0030d594a5b40c3ed23be0cc860c26..4b3d93fbf9a5a0266c5f4d52695c59cf8f495e07 100644 (file)
@@ -81,16 +81,5 @@ static struct platform_driver ion_driver = {
        .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);