alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ASoC: tas5086: use module_i2c_driver to simplify the code
@ 2013-03-12 13:36 Wei Yongjun
  2013-03-12 13:40 ` Daniel Mack
  2013-03-12 18:17 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2013-03-12 13:36 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, grant.likely, rob.herring,
	zonque
  Cc: yongjun_wei, alsa-devel, devicetree-discuss, linux-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Use the module_i2c_driver() macro to make the code smaller
and a bit simpler.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 sound/soc/codecs/tas5086.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c
index 008bea4..40cee84 100644
--- a/sound/soc/codecs/tas5086.c
+++ b/sound/soc/codecs/tas5086.c
@@ -584,17 +584,7 @@ static struct i2c_driver tas5086_i2c_driver = {
 	.remove		= tas5086_i2c_remove,
 };
 
-static int __init tas5086_modinit(void)
-{
-	return i2c_add_driver(&tas5086_i2c_driver);
-}
-module_init(tas5086_modinit);
-
-static void __exit tas5086_modexit(void)
-{
-	i2c_del_driver(&tas5086_i2c_driver);
-}
-module_exit(tas5086_modexit);
+module_i2c_driver(tas5086_i2c_driver);
 
 MODULE_AUTHOR("Daniel Mack <zonque@gmail.com>");
 MODULE_DESCRIPTION("Texas Instruments TAS5086 ALSA SoC Codec Driver");

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

* Re: [PATCH -next] ASoC: tas5086: use module_i2c_driver to simplify the code
  2013-03-12 13:36 [PATCH -next] ASoC: tas5086: use module_i2c_driver to simplify the code Wei Yongjun
@ 2013-03-12 13:40 ` Daniel Mack
  2013-03-12 18:17 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Mack @ 2013-03-12 13:40 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: lgirdwood, broonie, perex, tiwai, grant.likely, rob.herring,
	yongjun_wei, alsa-devel, devicetree-discuss, linux-kernel

On 12.03.2013 14:36, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Use the module_i2c_driver() macro to make the code smaller
> and a bit simpler.

Thanks for catching this!

> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Acked-by: Daniel Mack <zonque@gmail.com>



> ---
>  sound/soc/codecs/tas5086.c | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c
> index 008bea4..40cee84 100644
> --- a/sound/soc/codecs/tas5086.c
> +++ b/sound/soc/codecs/tas5086.c
> @@ -584,17 +584,7 @@ static struct i2c_driver tas5086_i2c_driver = {
>  	.remove		= tas5086_i2c_remove,
>  };
>  
> -static int __init tas5086_modinit(void)
> -{
> -	return i2c_add_driver(&tas5086_i2c_driver);
> -}
> -module_init(tas5086_modinit);
> -
> -static void __exit tas5086_modexit(void)
> -{
> -	i2c_del_driver(&tas5086_i2c_driver);
> -}
> -module_exit(tas5086_modexit);
> +module_i2c_driver(tas5086_i2c_driver);
>  
>  MODULE_AUTHOR("Daniel Mack <zonque@gmail.com>");
>  MODULE_DESCRIPTION("Texas Instruments TAS5086 ALSA SoC Codec Driver");
> 
> 

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

* Re: [PATCH -next] ASoC: tas5086: use module_i2c_driver to simplify the code
  2013-03-12 13:36 [PATCH -next] ASoC: tas5086: use module_i2c_driver to simplify the code Wei Yongjun
  2013-03-12 13:40 ` Daniel Mack
@ 2013-03-12 18:17 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-03-12 18:17 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: lgirdwood, perex, tiwai, grant.likely, rob.herring, zonque,
	yongjun_wei, alsa-devel, devicetree-discuss, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 223 bytes --]

On Tue, Mar 12, 2013 at 09:36:24PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Use the module_i2c_driver() macro to make the code smaller
> and a bit simpler.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2013-03-12 18:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-12 13:36 [PATCH -next] ASoC: tas5086: use module_i2c_driver to simplify the code Wei Yongjun
2013-03-12 13:40 ` Daniel Mack
2013-03-12 18:17 ` Mark Brown

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).