Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1522645 > unrolled thread

[PATCH] [media] sh_mobile_ceu_camera: use module_platform_driver

Started byGeliang Tang <geliangtang@gmail.com>
First post2016-11-15 14:00 +0100
Last post2016-11-15 14:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] [media] sh_mobile_ceu_camera: use module_platform_driver Geliang Tang <geliangtang@gmail.com> - 2016-11-15 14:00 +0100

#1522645 — [PATCH] [media] sh_mobile_ceu_camera: use module_platform_driver

FromGeliang Tang <geliangtang@gmail.com>
Date2016-11-15 14:00 +0100
Subject[PATCH] [media] sh_mobile_ceu_camera: use module_platform_driver
Message-ID<sDLvb-52P-7@gated-at.bofh.it>
Use module_platform_driver() helper to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c b/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
index a15bfb5..96dc017 100644
--- a/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
+++ b/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
@@ -1801,18 +1801,7 @@ static struct platform_driver sh_mobile_ceu_driver = {
 	.remove		= sh_mobile_ceu_remove,
 };
 
-static int __init sh_mobile_ceu_init(void)
-{
-	return platform_driver_register(&sh_mobile_ceu_driver);
-}
-
-static void __exit sh_mobile_ceu_exit(void)
-{
-	platform_driver_unregister(&sh_mobile_ceu_driver);
-}
-
-module_init(sh_mobile_ceu_init);
-module_exit(sh_mobile_ceu_exit);
+module_platform_driver(sh_mobile_ceu_driver);
 
 MODULE_DESCRIPTION("SuperH Mobile CEU driver");
 MODULE_AUTHOR("Magnus Damm");
-- 
2.9.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web