From: Hans de Goede <hdegoede@redhat.com>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: linux-media@vger.kernel.org, mchehab@redhat.com, patches@linaro.org
Subject: Re: [PATCH 1/1] gspca: Use module_usb_driver macro
Date: Fri, 21 Dec 2012 12:12:46 +0100 [thread overview]
Message-ID: <50D4442E.5070902@redhat.com> (raw)
In-Reply-To: <1355302692-28475-1-git-send-email-sachin.kamat@linaro.org>
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);
>
prev parent reply other threads:[~2012-12-21 11:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50D4442E.5070902@redhat.com \
--to=hdegoede@redhat.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=patches@linaro.org \
--cc=sachin.kamat@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).