The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] media: gspca: use module_usb_driver()
@ 2026-05-07  1:53 Rosen Penev
  0 siblings, 0 replies; only message in thread
From: Rosen Penev @ 2026-05-07  1:53 UTC (permalink / raw)
  To: linux-media; +Cc: Hans Verkuil, Mauro Carvalho Chehab, open list

Nothing interesting happens in _init and _exit. Just use the macro to
simplify the code slightly.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/media/usb/gspca/touptek.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/drivers/media/usb/gspca/touptek.c b/drivers/media/usb/gspca/touptek.c
index dde311c25d9b..734644d928ab 100644
--- a/drivers/media/usb/gspca/touptek.c
+++ b/drivers/media/usb/gspca/touptek.c
@@ -709,19 +709,4 @@ static struct usb_driver sd_driver = {
 #endif
 };
 
-static int __init sd_mod_init(void)
-{
-	int ret;
-
-	ret = usb_register(&sd_driver);
-	if (ret < 0)
-		return ret;
-	return 0;
-}
-static void __exit sd_mod_exit(void)
-{
-	usb_deregister(&sd_driver);
-}
-
-module_init(sd_mod_init);
-module_exit(sd_mod_exit);
+module_usb_driver(sd_driver);
-- 
2.54.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-07  1:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-07  1:53 [PATCH] media: gspca: use module_usb_driver() Rosen Penev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox