From: Axel Lin <axel.lin@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Andrey Danin <danindrey@mail.ru>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Leon Romanovsky <leon@leon.nu>, Liam Girdwood <lrg@ti.com>
Subject: [PATCH 3/3] ASoC: alc5632: Convert to devm_regmap_init_i2c()
Date: Tue, 08 May 2012 23:44:55 +0800 [thread overview]
Message-ID: <1336491895.14361.3.camel@phoenix> (raw)
In-Reply-To: <1336491743.14361.1.camel@phoenix>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
sound/soc/codecs/alc5632.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/alc5632.c b/sound/soc/codecs/alc5632.c
index b29a53b..7dd0242 100644
--- a/sound/soc/codecs/alc5632.c
+++ b/sound/soc/codecs/alc5632.c
@@ -1130,7 +1130,7 @@ static __devinit int alc5632_i2c_probe(struct i2c_client *client,
i2c_set_clientdata(client, alc5632);
- alc5632->regmap = regmap_init_i2c(client, &alc5632_regmap);
+ alc5632->regmap = devm_regmap_init_i2c(client, &alc5632_regmap);
if (IS_ERR(alc5632->regmap)) {
ret = PTR_ERR(alc5632->regmap);
dev_err(&client->dev, "regmap_init() failed: %d\n", ret);
@@ -1142,7 +1142,6 @@ static __devinit int alc5632_i2c_probe(struct i2c_client *client,
if (ret1 != 0 || ret2 != 0) {
dev_err(&client->dev,
"Failed to read chip ID: ret1=%d, ret2=%d\n", ret1, ret2);
- regmap_exit(alc5632->regmap);
return -EIO;
}
@@ -1151,14 +1150,12 @@ static __devinit int alc5632_i2c_probe(struct i2c_client *client,
if ((vid1 != 0x10EC) || (vid2 != id->driver_data)) {
dev_err(&client->dev,
"Device is not a ALC5632: VID1=0x%x, VID2=0x%x\n", vid1, vid2);
- regmap_exit(alc5632->regmap);
return -EINVAL;
}
ret = alc5632_reset(alc5632->regmap);
if (ret < 0) {
dev_err(&client->dev, "Failed to issue reset\n");
- regmap_exit(alc5632->regmap);
return ret;
}
@@ -1176,7 +1173,6 @@ static __devinit int alc5632_i2c_probe(struct i2c_client *client,
if (ret < 0) {
dev_err(&client->dev, "Failed to register codec: %d\n", ret);
- regmap_exit(alc5632->regmap);
return ret;
}
@@ -1185,9 +1181,7 @@ static __devinit int alc5632_i2c_probe(struct i2c_client *client,
static __devexit int alc5632_i2c_remove(struct i2c_client *client)
{
- struct alc5632_priv *alc5632 = i2c_get_clientdata(client);
snd_soc_unregister_codec(&client->dev);
- regmap_exit(alc5632->regmap);
return 0;
}
--
1.7.5.4
next prev parent reply other threads:[~2012-05-08 15:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 15:42 [PATCH 1/3] ASoC: alc5623: Convert to module_i2c_driver() Axel Lin
2012-05-08 15:43 ` [PATCH 2/3] ASoC: alc5632: " Axel Lin
2012-05-08 15:44 ` Axel Lin [this message]
2012-05-08 17:46 ` [PATCH 1/3] ASoC: alc5623: " Mark Brown
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=1336491895.14361.3.camel@phoenix \
--to=axel.lin@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=danindrey@mail.ru \
--cc=leon@leon.nu \
--cc=lrg@ti.com \
/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 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.