[media] pci: cx88-mpeg: Use module_pci_driver
authorSachin Kamat <sachin.kamat@linaro.org>
Fri, 20 Sep 2013 08:32:06 +0000 (05:32 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 17 Oct 2013 08:56:30 +0000 (05:56 -0300)
module_pci_driver removes some boilerplate and makes code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/pci/cx88/cx88-mpeg.c

index 2d3507eb48972046a5baa70772fe685df64bfbec..e31a75fefbdf528d36e9dc586440f784f5f8c3f7 100644 (file)
@@ -903,20 +903,8 @@ static struct pci_driver cx8802_pci_driver = {
        .remove   = cx8802_remove,
 };
 
-static int __init cx8802_init(void)
-{
-       printk(KERN_INFO "cx88/2: cx2388x MPEG-TS Driver Manager version %s loaded\n",
-              CX88_VERSION);
-       return pci_register_driver(&cx8802_pci_driver);
-}
-
-static void __exit cx8802_fini(void)
-{
-       pci_unregister_driver(&cx8802_pci_driver);
-}
+module_pci_driver(cx8802_pci_driver);
 
-module_init(cx8802_init);
-module_exit(cx8802_fini);
 EXPORT_SYMBOL(cx8802_buf_prepare);
 EXPORT_SYMBOL(cx8802_buf_queue);
 EXPORT_SYMBOL(cx8802_cancel_buffers);