]> git.karo-electronics.de Git - linux-beck.git/commitdiff
PNP: ide/ide-pnp: Use module_pnp_driver to register driver
authorPeter Huewe <PeterHuewe@gmx.de>
Mon, 16 Mar 2015 20:46:33 +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/ide/ide-pnp.c

index e5f3db8313733ce8ce9b682cc7b63dc3e5558d38..f5f2b62471da919e4ffd859b8a96ae738d38cea8 100644 (file)
@@ -96,17 +96,5 @@ static struct pnp_driver idepnp_driver = {
        .remove         = idepnp_remove,
 };
 
-static int __init pnpide_init(void)
-{
-       return pnp_register_driver(&idepnp_driver);
-}
-
-static void __exit pnpide_exit(void)
-{
-       pnp_unregister_driver(&idepnp_driver);
-}
-
-module_init(pnpide_init);
-module_exit(pnpide_exit);
-
+module_pnp_driver(idepnp_driver);
 MODULE_LICENSE("GPL");