[media] drivers/media/pci/dm1105/dm1105: Convert to module_pci_driver
authorLibo Chen <libo.chen@huawei.com>
Mon, 27 May 2013 01:31:43 +0000 (22:31 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 17 Jun 2013 16:13:55 +0000 (13:13 -0300)
use module_pci_driver instead of init/exit, make code clean.

Signed-off-by: Libo Chen <libo.chen@huawei.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/pci/b2c2/flexcop-pci.c

index 44f8fb5f17ff49c9a6fadc912d9d69b278ea5be7..447afbd904a4bd9dc3ca1f75169083798b879e61 100644 (file)
@@ -432,18 +432,7 @@ static struct pci_driver flexcop_pci_driver = {
        .remove   = flexcop_pci_remove,
 };
 
-static int __init flexcop_pci_module_init(void)
-{
-       return pci_register_driver(&flexcop_pci_driver);
-}
-
-static void __exit flexcop_pci_module_exit(void)
-{
-       pci_unregister_driver(&flexcop_pci_driver);
-}
-
-module_init(flexcop_pci_module_init);
-module_exit(flexcop_pci_module_exit);
+module_pci_driver(flexcop_pci_driver);
 
 MODULE_AUTHOR(DRIVER_AUTHOR);
 MODULE_DESCRIPTION(DRIVER_NAME);