PNP: net/sb1000: Use module_pnp_driver to register driver
authorPeter Huewe <PeterHuewe@gmx.de>
Mon, 16 Mar 2015 20:46:35 +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/net/sb1000.c

index 66c2f1a01963c27f9e7b3f1e50e01c964e0429e2..aad0b59d41e304c6481c0b58e04afd1db2b51918 100644 (file)
@@ -1175,17 +1175,4 @@ MODULE_AUTHOR("Franco Venturi <fventuri@mediaone.net>");
 MODULE_DESCRIPTION("General Instruments SB1000 driver");
 MODULE_LICENSE("GPL");
 
-static int __init
-sb1000_init(void)
-{
-       return pnp_register_driver(&sb1000_driver);
-}
-
-static void __exit
-sb1000_exit(void)
-{
-       pnp_unregister_driver(&sb1000_driver);
-}
-
-module_init(sb1000_init);
-module_exit(sb1000_exit);
+module_pnp_driver(sb1000_driver);