hwmon: (ibmpowernv) Convert to module_platform_driver
authorAxel Lin <axel.lin@ingics.com>
Wed, 12 Nov 2014 08:36:47 +0000 (16:36 +0800)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 1 Dec 2014 04:13:13 +0000 (20:13 -0800)
Use module_platform_driver to simplify the code a bit.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/ibmpowernv.c

index c7577b8f17a808382672d57d2157498b87b34d0f..7c2c7be182f25df547af0316abbcb1b52e8258cd 100644 (file)
@@ -318,19 +318,8 @@ static struct platform_driver ibmpowernv_driver = {
        },
 };
 
-static int __init ibmpowernv_init(void)
-{
-       return platform_driver_register(&ibmpowernv_driver);
-}
-
-static void __exit ibmpowernv_exit(void)
-{
-       platform_driver_unregister(&ibmpowernv_driver);
-}
+module_platform_driver(ibmpowernv_driver);
 
 MODULE_AUTHOR("Neelesh Gupta <neelegup@linux.vnet.ibm.com>");
 MODULE_DESCRIPTION("IBM POWERNV platform sensors");
 MODULE_LICENSE("GPL");
-
-module_init(ibmpowernv_init);
-module_exit(ibmpowernv_exit);