* [PATCH 1/1] gspca: Use module_usb_driver macro
@ 2012-12-12 8:58 Sachin Kamat
2012-12-21 11:12 ` Hans de Goede
0 siblings, 1 reply; 2+ messages in thread
From: Sachin Kamat @ 2012-12-12 8:58 UTC (permalink / raw)
To: linux-media; +Cc: hdegoede, mchehab, sachin.kamat, patches
module_usb_driver eliminates a lot of boilerplate by replacing
module_init() and module_exit() calls.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
Compile tested with linux-next
---
drivers/media/usb/gspca/jl2005bcd.c | 18 +-----------------
1 files changed, 1 insertions(+), 17 deletions(-)
diff --git a/drivers/media/usb/gspca/jl2005bcd.c b/drivers/media/usb/gspca/jl2005bcd.c
index 62ba80d..fdaeeb1 100644
--- a/drivers/media/usb/gspca/jl2005bcd.c
+++ b/drivers/media/usb/gspca/jl2005bcd.c
@@ -536,20 +536,4 @@ static struct usb_driver sd_driver = {
#endif
};
-/* -- module insert / remove -- */
-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);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] gspca: Use module_usb_driver macro
2012-12-12 8:58 [PATCH 1/1] gspca: Use module_usb_driver macro Sachin Kamat
@ 2012-12-21 11:12 ` Hans de Goede
0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2012-12-21 11:12 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-media, mchehab, patches
Hi,
On 12/12/2012 09:58 AM, Sachin Kamat wrote:
> module_usb_driver eliminates a lot of boilerplate by replacing
> module_init() and module_exit() calls.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Thanks I've added this patch to my tree, and it will be included
in my fixes pull-req for 3.8 to Mauro later today.
Regards,
Hans
> ---
> Compile tested with linux-next
> ---
> drivers/media/usb/gspca/jl2005bcd.c | 18 +-----------------
> 1 files changed, 1 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/media/usb/gspca/jl2005bcd.c b/drivers/media/usb/gspca/jl2005bcd.c
> index 62ba80d..fdaeeb1 100644
> --- a/drivers/media/usb/gspca/jl2005bcd.c
> +++ b/drivers/media/usb/gspca/jl2005bcd.c
> @@ -536,20 +536,4 @@ static struct usb_driver sd_driver = {
> #endif
> };
>
> -/* -- module insert / remove -- */
> -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);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-21 11:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-12 8:58 [PATCH 1/1] gspca: Use module_usb_driver macro Sachin Kamat
2012-12-21 11:12 ` Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).