diff mbox

[1/3] ASoC: rt5677: Convert to use module_i2c_driver

Message ID 1401764201.15216.0.camel@phoenix (mailing list archive)
State Accepted
Commit c8cfbec882b408cd933d24882302cacd39985e18
Headers show

Commit Message

Axel Lin June 3, 2014, 2:56 a.m. UTC
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 sound/soc/codecs/rt5677.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

Comments

Oder Chiou June 9, 2014, 2:24 a.m. UTC | #1
> -----Original Message-----
> From: Axel Lin [mailto:axel.lin@ingics.com]
> Sent: Tuesday, June 03, 2014 10:57 AM
> To: Mark Brown
> Cc: Oder Chiou; Liam Girdwood; alsa-devel@alsa-project.org
> Subject: [PATCH 1/3] ASoC: rt5677: Convert to use module_i2c_driver
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  sound/soc/codecs/rt5677.c | 13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)
> 
> diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index
> 833231e..60fff7f 100644
> --- a/sound/soc/codecs/rt5677.c
> +++ b/sound/soc/codecs/rt5677.c
> @@ -3480,18 +3480,7 @@ static struct i2c_driver rt5677_i2c_driver = {
>  	.remove   = rt5677_i2c_remove,
>  	.id_table = rt5677_i2c_id,
>  };
> -
> -static int __init rt5677_modinit(void)
> -{
> -	return i2c_add_driver(&rt5677_i2c_driver);
> -}
> -module_init(rt5677_modinit);
> -
> -static void __exit rt5677_modexit(void) -{
> -	i2c_del_driver(&rt5677_i2c_driver);
> -}
> -module_exit(rt5677_modexit);
> +module_i2c_driver(rt5677_i2c_driver);
> 
>  MODULE_DESCRIPTION("ASoC RT5677 driver");  MODULE_AUTHOR("Oder
> Chiou <oder_chiou@realtek.com>");
> --
> 1.8.3.2
> 
> 

Tested-by: Oder Chiou <oder_chiou@realtek.com>

Thanks
Mark Brown June 9, 2014, 8:15 p.m. UTC | #2
On Tue, Jun 03, 2014 at 10:56:41AM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c
index 833231e..60fff7f 100644
--- a/sound/soc/codecs/rt5677.c
+++ b/sound/soc/codecs/rt5677.c
@@ -3480,18 +3480,7 @@  static struct i2c_driver rt5677_i2c_driver = {
 	.remove   = rt5677_i2c_remove,
 	.id_table = rt5677_i2c_id,
 };
-
-static int __init rt5677_modinit(void)
-{
-	return i2c_add_driver(&rt5677_i2c_driver);
-}
-module_init(rt5677_modinit);
-
-static void __exit rt5677_modexit(void)
-{
-	i2c_del_driver(&rt5677_i2c_driver);
-}
-module_exit(rt5677_modexit);
+module_i2c_driver(rt5677_i2c_driver);
 
 MODULE_DESCRIPTION("ASoC RT5677 driver");
 MODULE_AUTHOR("Oder Chiou <oder_chiou@realtek.com>");