[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211214161636.1886900-3-clabbe@baylibre.com>
Date: Tue, 14 Dec 2021 16:16:20 +0000
From: Corentin Labbe <clabbe@...libre.com>
To: mchehab@...nel.org, hverkuil@...all.nl, gregkh@...uxfoundation.org
Cc: linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
linux-staging@...ts.linux.dev, mjpeg-users@...ts.sourceforge.net,
Corentin Labbe <clabbe@...libre.com>
Subject: [PATCH v4 02/18] staging: media: zoran: use module_pci_driver
Simplify code by using module_pci_driver()
Signed-off-by: Corentin Labbe <clabbe@...libre.com>
---
drivers/staging/media/zoran/zoran_card.c | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/drivers/staging/media/zoran/zoran_card.c b/drivers/staging/media/zoran/zoran_card.c
index 3bc0e64f1007..f1465fbf98af 100644
--- a/drivers/staging/media/zoran/zoran_card.c
+++ b/drivers/staging/media/zoran/zoran_card.c
@@ -1314,23 +1314,4 @@ static struct pci_driver zoran_driver = {
.remove = zoran_remove,
};
-static int __init zoran_init(void)
-{
- int res;
-
- res = pci_register_driver(&zoran_driver);
- if (res) {
- pr_err("Unable to register ZR36057 driver\n");
- return res;
- }
-
- return 0;
-}
-
-static void __exit zoran_exit(void)
-{
- pci_unregister_driver(&zoran_driver);
-}
-
-module_init(zoran_init);
-module_exit(zoran_exit);
+module_pci_driver(zoran_driver);
--
2.32.0
Powered by blists - more mailing lists