All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: Convert mid-x86 directory to module_platform_driver
@ 2011-11-24  3:51 Axel Lin
  2011-11-24  8:40 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2011-11-24  3:51 UTC (permalink / raw)
  To: alsa-devel
  Cc: Vinod Koul, Lu Guanqun, Harsha Priya, Liam Girdwood, Mark Brown

Factor out some boilerplate code.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/mid-x86/mfld_machine.c |   14 +-------------
 sound/soc/mid-x86/sst_platform.c |   14 +-------------
 2 files changed, 2 insertions(+), 26 deletions(-)

diff --git a/sound/soc/mid-x86/mfld_machine.c b/sound/soc/mid-x86/mfld_machine.c
index cca693a..e53f8e4 100644
--- a/sound/soc/mid-x86/mfld_machine.c
+++ b/sound/soc/mid-x86/mfld_machine.c
@@ -428,19 +428,7 @@ static struct platform_driver snd_mfld_mc_driver = {
 	.remove = __devexit_p(snd_mfld_mc_remove),
 };
 
-static int __init snd_mfld_driver_init(void)
-{
-	pr_debug("snd_mfld_driver_init called\n");
-	return platform_driver_register(&snd_mfld_mc_driver);
-}
-module_init(snd_mfld_driver_init);
-
-static void __exit snd_mfld_driver_exit(void)
-{
-	pr_debug("snd_mfld_driver_exit called\n");
-	platform_driver_unregister(&snd_mfld_mc_driver);
-}
-module_exit(snd_mfld_driver_exit);
+module_platform_driver(snd_mfld_mc_driver);
 
 MODULE_DESCRIPTION("ASoC Intel(R) MID Machine driver");
 MODULE_AUTHOR("Vinod Koul <vinod.koul@intel.com>");
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c
index 2305702..94f70b3 100644
--- a/sound/soc/mid-x86/sst_platform.c
+++ b/sound/soc/mid-x86/sst_platform.c
@@ -472,19 +472,7 @@ static struct platform_driver sst_platform_driver = {
 	.remove		= sst_platform_remove,
 };
 
-static int __init sst_soc_platform_init(void)
-{
-	pr_debug("sst_soc_platform_init called\n");
-	return platform_driver_register(&sst_platform_driver);
-}
-module_init(sst_soc_platform_init);
-
-static void __exit sst_soc_platform_exit(void)
-{
-	platform_driver_unregister(&sst_platform_driver);
-	pr_debug("sst_soc_platform_exit success\n");
-}
-module_exit(sst_soc_platform_exit);
+module_platform_driver(sst_platform_driver);
 
 MODULE_DESCRIPTION("ASoC Intel(R) MID Platform driver");
 MODULE_AUTHOR("Vinod Koul <vinod.koul@intel.com>");
-- 
1.7.5.4

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

* Re: [PATCH] ASoC: Convert mid-x86 directory to module_platform_driver
  2011-11-24  3:51 [PATCH] ASoC: Convert mid-x86 directory to module_platform_driver Axel Lin
@ 2011-11-24  8:40 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2011-11-24  8:40 UTC (permalink / raw)
  To: Axel Lin; +Cc: alsa-devel, Lu Guanqun, Liam Girdwood, Mark Brown

On Thu, 2011-11-24 at 11:51 +0800, Axel Lin wrote:
> Factor out some boilerplate code.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  sound/soc/mid-x86/mfld_machine.c |   14 +-------------
>  sound/soc/mid-x86/sst_platform.c |   14 +-------------
>  2 files changed, 2 insertions(+), 26 deletions(-)
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>

> 
> diff --git a/sound/soc/mid-x86/mfld_machine.c b/sound/soc/mid-x86/mfld_machine.c
> index cca693a..e53f8e4 100644
> --- a/sound/soc/mid-x86/mfld_machine.c
> +++ b/sound/soc/mid-x86/mfld_machine.c
> @@ -428,19 +428,7 @@ static struct platform_driver snd_mfld_mc_driver = {
>  	.remove = __devexit_p(snd_mfld_mc_remove),
>  };
>  
> -static int __init snd_mfld_driver_init(void)
> -{
> -	pr_debug("snd_mfld_driver_init called\n");
> -	return platform_driver_register(&snd_mfld_mc_driver);
> -}
> -module_init(snd_mfld_driver_init);
> -
> -static void __exit snd_mfld_driver_exit(void)
> -{
> -	pr_debug("snd_mfld_driver_exit called\n");
> -	platform_driver_unregister(&snd_mfld_mc_driver);
> -}
> -module_exit(snd_mfld_driver_exit);
> +module_platform_driver(snd_mfld_mc_driver);
>  
>  MODULE_DESCRIPTION("ASoC Intel(R) MID Machine driver");
>  MODULE_AUTHOR("Vinod Koul <vinod.koul@intel.com>");
> diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c
> index 2305702..94f70b3 100644
> --- a/sound/soc/mid-x86/sst_platform.c
> +++ b/sound/soc/mid-x86/sst_platform.c
> @@ -472,19 +472,7 @@ static struct platform_driver sst_platform_driver = {
>  	.remove		= sst_platform_remove,
>  };
>  
> -static int __init sst_soc_platform_init(void)
> -{
> -	pr_debug("sst_soc_platform_init called\n");
> -	return platform_driver_register(&sst_platform_driver);
> -}
> -module_init(sst_soc_platform_init);
> -
> -static void __exit sst_soc_platform_exit(void)
> -{
> -	platform_driver_unregister(&sst_platform_driver);
> -	pr_debug("sst_soc_platform_exit success\n");
> -}
> -module_exit(sst_soc_platform_exit);
> +module_platform_driver(sst_platform_driver);
>  
>  MODULE_DESCRIPTION("ASoC Intel(R) MID Platform driver");
>  MODULE_AUTHOR("Vinod Koul <vinod.koul@intel.com>");


-- 
~Vinod

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

end of thread, other threads:[~2011-11-24  8:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-24  3:51 [PATCH] ASoC: Convert mid-x86 directory to module_platform_driver Axel Lin
2011-11-24  8:40 ` Vinod Koul

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.