]> git.karo-electronics.de Git - linux-beck.git/commitdiff
uwb/whci: Use module_pci_driver to register driver
authorPeter Huewe <peterhuewe@gmx.de>
Mon, 20 May 2013 20:51:17 +0000 (22:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2013 18:48:03 +0000 (11:48 -0700)
Removing some boilerplate by using module_pci_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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/uwb/whci.c

index f48093e649e4203ecb9408406b44e42f936e9ff2..c9df8ba97daec8f644bc0ff9cc77afe513510903 100644 (file)
@@ -253,19 +253,7 @@ static struct pci_driver whci_driver = {
        .remove   = whci_remove,
 };
 
-static int __init whci_init(void)
-{
-       return pci_register_driver(&whci_driver);
-}
-
-static void __exit whci_exit(void)
-{
-       pci_unregister_driver(&whci_driver);
-}
-
-module_init(whci_init);
-module_exit(whci_exit);
-
+module_pci_driver(whci_driver);
 MODULE_DESCRIPTION("WHCI UWB Multi-interface Controller enumerator");
 MODULE_AUTHOR("Cambridge Silicon Radio Ltd.");
 MODULE_LICENSE("GPL");