All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: max98090: Convert to devm_regmap_init_i2c
@ 2013-03-03  8:49 Axel Lin
  2013-03-03 14:48 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2013-03-03  8:49 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, alsa-devel, Ralph Birt, Jerry Wong, Matthew Mowdy

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 sound/soc/codecs/max98090.c |   16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index fc17604..6dd36da 100755
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -2324,28 +2324,20 @@ static int max98090_i2c_probe(struct i2c_client *i2c,
 	max98090->pdata = i2c->dev.platform_data;
 	max98090->irq = i2c->irq;
 
-	max98090->regmap = regmap_init_i2c(i2c, &max98090_regmap);
+	max98090->regmap = devm_regmap_init_i2c(i2c, &max98090_regmap);
 	if (IS_ERR(max98090->regmap)) {
 		ret = PTR_ERR(max98090->regmap);
 		dev_err(&i2c->dev, "Failed to allocate regmap: %d\n", ret);
-		goto err_enable;
+		return ret;
 	}
 
-	ret = snd_soc_register_codec(&i2c->dev,
-			&soc_codec_dev_max98090, max98090_dai,
-			ARRAY_SIZE(max98090_dai));
-	if (ret < 0)
-		regmap_exit(max98090->regmap);
-
-err_enable:
-	return ret;
+	return snd_soc_register_codec(&i2c->dev, &soc_codec_dev_max98090,
+				      max98090_dai, ARRAY_SIZE(max98090_dai));
 }
 
 static int max98090_i2c_remove(struct i2c_client *client)
 {
-	struct max98090_priv *max98090 = dev_get_drvdata(&client->dev);
 	snd_soc_unregister_codec(&client->dev);
-	regmap_exit(max98090->regmap);
 	return 0;
 }
 
-- 
1.7.9.5

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

* Re: [PATCH] ASoC: max98090: Convert to devm_regmap_init_i2c
  2013-03-03  8:49 [PATCH] ASoC: max98090: Convert to devm_regmap_init_i2c Axel Lin
@ 2013-03-03 14:48 ` Mark Brown
  2013-03-03 14:52   ` Axel Lin
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2013-03-03 14:48 UTC (permalink / raw)
  To: Axel Lin; +Cc: Liam Girdwood, alsa-devel, Ralph Birt, Jerry Wong, Matthew Mowdy


[-- Attachment #1.1: Type: text/plain, Size: 171 bytes --]

On Sun, Mar 03, 2013 at 04:49:06PM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Looks like this needs a refresh against current topic/max98090?

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

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH] ASoC: max98090: Convert to devm_regmap_init_i2c
  2013-03-03 14:48 ` Mark Brown
@ 2013-03-03 14:52   ` Axel Lin
  0 siblings, 0 replies; 3+ messages in thread
From: Axel Lin @ 2013-03-03 14:52 UTC (permalink / raw)
  To: Mark Brown
  Cc: Liam Girdwood, alsa-devel, Ralph Birt, Jerry Wong, Matthew Mowdy

2013/3/3 Mark Brown <broonie@opensource.wolfsonmicro.com>:
> On Sun, Mar 03, 2013 at 04:49:06PM +0800, Axel Lin wrote:
>> Signed-off-by: Axel Lin <axel.lin@ingics.com>
>
> Looks like this needs a refresh against current topic/max98090?

Oh. Just found there is already a similar patch in topic/max98090 branch.
Please ignore this patch.

Thanks,
Axel

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

end of thread, other threads:[~2013-03-03 14:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-03  8:49 [PATCH] ASoC: max98090: Convert to devm_regmap_init_i2c Axel Lin
2013-03-03 14:48 ` Mark Brown
2013-03-03 14:52   ` Axel Lin

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.