PNP: platform/x86/apple-gmux: Use module_pnp_driver to register driver
authorPeter Huewe <PeterHuewe@gmx.de>
Mon, 16 Mar 2015 20:46:36 +0000 (21:46 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 18 Mar 2015 21:39:17 +0000 (22:39 +0100)
Removing some boilerplate by using module_pnp_driver instead of calling
register and unregister in the otherwise empty init/exit functions

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/platform/x86/apple-gmux.c

index b9429fbf1cd82a403c65bddd09acc6e11078b66a..66d6d22c239c2b2231ca6837bc36d4cd89a9edb7 100644 (file)
@@ -624,19 +624,7 @@ static struct pnp_driver gmux_pnp_driver = {
        },
 };
 
-static int __init apple_gmux_init(void)
-{
-       return pnp_register_driver(&gmux_pnp_driver);
-}
-
-static void __exit apple_gmux_exit(void)
-{
-       pnp_unregister_driver(&gmux_pnp_driver);
-}
-
-module_init(apple_gmux_init);
-module_exit(apple_gmux_exit);
-
+module_pnp_driver(gmux_pnp_driver);
 MODULE_AUTHOR("Seth Forshee <seth.forshee@canonical.com>");
 MODULE_DESCRIPTION("Apple Gmux Driver");
 MODULE_LICENSE("GPL");