public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] staging/iio: use module_platform_driver macro
@ 2012-07-21  8:54 Devendra Naga
  2012-07-22 19:28 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Devendra Naga @ 2012-07-21  8:54 UTC (permalink / raw)
  To: Jonathan Cameron, Greg Kroah-Hartman, linux-iio, devel,
	linux-kernel
  Cc: Devendra Naga

the code which under _init and _exit does only the platform_driver_register
and platform_driver_unregister, and nothing else,
so its better to use the module_platform_driver macro rather duplicating
its implementation

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
---

 drivers/staging/iio/iio_hwmon.c |   12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/staging/iio/iio_hwmon.c b/drivers/staging/iio/iio_hwmon.c
index 27d27ec..4bb017a 100644
--- a/drivers/staging/iio/iio_hwmon.c
+++ b/drivers/staging/iio/iio_hwmon.c
@@ -215,17 +215,7 @@ static struct platform_driver __refdata iio_hwmon_driver = {
 	.remove = __devexit_p(iio_hwmon_remove),
 };
 
-static int iio_inkern_init(void)
-{
-	return platform_driver_register(&iio_hwmon_driver);
-}
-module_init(iio_inkern_init);
-
-static void iio_inkern_exit(void)
-{
-	platform_driver_unregister(&iio_hwmon_driver);
-}
-module_exit(iio_inkern_exit);
+module_platform_driver(iio_hwmon_driver);
 
 MODULE_AUTHOR("Jonathan Cameron <jic23@cam.ac.uk>");
 MODULE_DESCRIPTION("IIO to hwmon driver");
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-22 19:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-21  8:54 [PATCH 1/2] staging/iio: use module_platform_driver macro Devendra Naga
2012-07-22 19:28 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox