summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-02 08:35:10 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-02 08:35:10 +0400
commit605886854398d90ee3ba00bb504f2284fb97a5f9 (patch)
treebd6f5399d0453aa3f4e752b2932a8699322187f1
parent674b36635091ed1d768fccf88d43ba4a9959f84d (diff)
parent8f255e7ba30397bcf3c997dd3f34e24b85616176 (diff)
downloadlinux-605886854398d90ee3ba00bb504f2284fb97a5f9.tar.xz
Merge remote-tracking branch 'asoc/topic/max9768' into asoc-next
-rw-r--r--sound/soc/codecs/max9768.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/soc/codecs/max9768.c b/sound/soc/codecs/max9768.c
index 17b3ec2d05cb..a777de6a1b23 100644
--- a/sound/soc/codecs/max9768.c
+++ b/sound/soc/codecs/max9768.c
@@ -187,7 +187,7 @@ static int __devinit max9768_i2c_probe(struct i2c_client *client,
i2c_set_clientdata(client, max9768);
- max9768->regmap = regmap_init_i2c(client, &max9768_i2c_regmap_config);
+ max9768->regmap = devm_regmap_init_i2c(client, &max9768_i2c_regmap_config);
if (IS_ERR(max9768->regmap)) {
err = PTR_ERR(max9768->regmap);
goto err_gpio_free;
@@ -195,12 +195,10 @@ static int __devinit max9768_i2c_probe(struct i2c_client *client,
err = snd_soc_register_codec(&client->dev, &max9768_codec_driver, NULL, 0);
if (err)
- goto err_regmap_free;
+ goto err_gpio_free;
return 0;
- err_regmap_free:
- regmap_exit(max9768->regmap);
err_gpio_free:
if (gpio_is_valid(max9768->shdn_gpio))
gpio_free(max9768->shdn_gpio);
@@ -215,7 +213,6 @@ static int __devexit max9768_i2c_remove(struct i2c_client *client)
struct max9768 *max9768 = i2c_get_clientdata(client);
snd_soc_unregister_codec(&client->dev);
- regmap_exit(max9768->regmap);
if (gpio_is_valid(max9768->shdn_gpio))
gpio_free(max9768->shdn_gpio);