diff mbox

[-next] gpu: ion: use module_platform_driver to simplify the code

Message ID CAPgLHd9V2FR8sfEG_Q4SQoXgjVP9oRzC14LVZKqC8Lz+VHBjjQ@mail.gmail.com
State Not Applicable, archived
Headers show

Commit Message

Wei Yongjun Dec. 17, 2013, 3:16 a.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

module_platform_driver() makes the code simpler by eliminating
boilerplate code.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/staging/android/ion/tegra/tegra_ion.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/staging/android/ion/tegra/tegra_ion.c b/drivers/staging/android/ion/tegra/tegra_ion.c
index 0849600..4b3d93f 100644
--- a/drivers/staging/android/ion/tegra/tegra_ion.c
+++ b/drivers/staging/android/ion/tegra/tegra_ion.c
@@ -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);