Commit d16f6dbd authored by Devendra Naga's avatar Devendra Naga Committed by Jonathan Cameron

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: default avatarDevendra Naga <develkernel412222@gmail.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent f4e4b955
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment