All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ALSA: usb-audio: Use module_usb_driver
@ 2013-10-09 11:52 Sachin Kamat
  2013-10-09 12:01 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Sachin Kamat @ 2013-10-09 11:52 UTC (permalink / raw)
  To: alsa-devel; +Cc: tiwai, sachin.kamat

module_usb_driver makes code simpler by removing the boilerplate.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 sound/usb/card.c |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/sound/usb/card.c b/sound/usb/card.c
index 9d9de8d..d979050 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -751,15 +751,4 @@ static struct usb_driver usb_audio_driver = {
 	.supports_autosuspend = 1,
 };
 
-static int __init snd_usb_audio_init(void)
-{
-	return usb_register(&usb_audio_driver);
-}
-
-static void __exit snd_usb_audio_cleanup(void)
-{
-	usb_deregister(&usb_audio_driver);
-}
-
-module_init(snd_usb_audio_init);
-module_exit(snd_usb_audio_cleanup);
+module_usb_driver(usb_audio_driver);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] ALSA: usb-audio: Use module_usb_driver
  2013-10-09 11:52 [PATCH 1/1] ALSA: usb-audio: Use module_usb_driver Sachin Kamat
@ 2013-10-09 12:01 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2013-10-09 12:01 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: alsa-devel

At Wed,  9 Oct 2013 17:22:32 +0530,
Sachin Kamat wrote:
> 
> module_usb_driver makes code simpler by removing the boilerplate.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Thanks, applied.


Takashi

> ---
>  sound/usb/card.c |   13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/sound/usb/card.c b/sound/usb/card.c
> index 9d9de8d..d979050 100644
> --- a/sound/usb/card.c
> +++ b/sound/usb/card.c
> @@ -751,15 +751,4 @@ static struct usb_driver usb_audio_driver = {
>  	.supports_autosuspend = 1,
>  };
>  
> -static int __init snd_usb_audio_init(void)
> -{
> -	return usb_register(&usb_audio_driver);
> -}
> -
> -static void __exit snd_usb_audio_cleanup(void)
> -{
> -	usb_deregister(&usb_audio_driver);
> -}
> -
> -module_init(snd_usb_audio_init);
> -module_exit(snd_usb_audio_cleanup);
> +module_usb_driver(usb_audio_driver);
> -- 
> 1.7.9.5
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-09 11:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-09 11:52 [PATCH 1/1] ALSA: usb-audio: Use module_usb_driver Sachin Kamat
2013-10-09 12:01 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.