From: Devendra Naga Date: Sat, 21 Jul 2012 08:54:00 +0000 (+0100) Subject: staging/iio: use module_platform_driver macro X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d16f6dbddbd7a2ac40e090da1e6bb7dd9b5a1dcb;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git staging/iio: use module_platform_driver macro 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 Signed-off-by: Jonathan Cameron --- diff --git a/drivers/staging/iio/iio_hwmon.c b/drivers/staging/iio/iio_hwmon.c index 27d27ec9521f..4bb017acbf41 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 "); MODULE_DESCRIPTION("IIO to hwmon driver");