[media] netup_unidvb: use module_pci_driver
authorGeliang Tang <geliangtang@gmail.com>
Wed, 16 Nov 2016 13:00:56 +0000 (11:00 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 22 Nov 2016 18:30:03 +0000 (16:30 -0200)
Use module_pci_driver() helper to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/netup_unidvb/netup_unidvb_core.c

index b078ac2a682cf61af156627263574dbf2859de18..191bd8299dc398896206a65885d21f343531550c 100644 (file)
@@ -1030,15 +1030,4 @@ static struct pci_driver netup_unidvb_pci_driver = {
        .resume   = NULL,
 };
 
-static int __init netup_unidvb_init(void)
-{
-       return pci_register_driver(&netup_unidvb_pci_driver);
-}
-
-static void __exit netup_unidvb_fini(void)
-{
-       pci_unregister_driver(&netup_unidvb_pci_driver);
-}
-
-module_init(netup_unidvb_init);
-module_exit(netup_unidvb_fini);
+module_pci_driver(netup_unidvb_pci_driver);