lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1322461296.4954.4.camel@phoenix>
Date:	Mon, 28 Nov 2011 14:21:36 +0800
From:	Axel Lin <axel.lin@...il.com>
To:	linux-kernel@...r.kernel.org
Cc:	Inki Dae <inki.dae@...sung.com>,
	Joonyoung Shim <jy0922.shim@...sung.com>,
	Seung-Woo Kim <sw0312.kim@...sung.com>,
	Inki Dae <inki.dae@...sung.com>,
	David Airlie <airlied@...ux.ie>,
	dri-devel@...ts.freedesktop.org
Subject: [PATCH] drm/exynos: convert drivers/gpu/drm/exynos/* to use
 module_platform_driver()

This patch converts the drivers in drivers/gpu/drm/exynos/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: Inki Dae <inki.dae@...sung.com>
Cc: Joonyoung Shim <jy0922.shim@...sung.com>
Cc: Seung-Woo Kim <sw0312.kim@...sung.com>
Signed-off-by: Axel Lin <axel.lin@...il.com>
---
 drivers/gpu/drm/exynos/exynos_drm_drv.c  |   17 +----------------
 drivers/gpu/drm/exynos/exynos_drm_fimd.c |   13 +------------
 2 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index 83810cb..812ad95 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -220,22 +220,7 @@ static struct platform_driver exynos_drm_platform_driver = {
 	},
 };
 
-static int __init exynos_drm_init(void)
-{
-	DRM_DEBUG_DRIVER("%s\n", __FILE__);
-
-	return platform_driver_register(&exynos_drm_platform_driver);
-}
-
-static void __exit exynos_drm_exit(void)
-{
-	DRM_DEBUG_DRIVER("%s\n", __FILE__);
-
-	platform_driver_unregister(&exynos_drm_platform_driver);
-}
-
-module_init(exynos_drm_init);
-module_exit(exynos_drm_exit);
+module_platform_driver(exynos_drm_platform_driver);
 
 MODULE_AUTHOR("Inki Dae <inki.dae@...sung.com>");
 MODULE_AUTHOR("Joonyoung Shim <jy0922.shim@...sung.com>");
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index 4659c88..0d6e955 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -792,18 +792,7 @@ static struct platform_driver fimd_driver = {
 	},
 };
 
-static int __init fimd_init(void)
-{
-	return platform_driver_register(&fimd_driver);
-}
-
-static void __exit fimd_exit(void)
-{
-	platform_driver_unregister(&fimd_driver);
-}
-
-module_init(fimd_init);
-module_exit(fimd_exit);
+module_platform_driver(fimd_driver);
 
 MODULE_AUTHOR("Joonyoung Shim <jy0922.shim@...sung.com>");
 MODULE_AUTHOR("Inki Dae <inki.dae@...sung.com>");
-- 
1.7.5.4



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ