diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-10 00:22:05 +0900 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-12-10 00:22:05 +0900 |
commit | ac0d9c9001ad1d2a37035cbefbf13f6022c52636 (patch) | |
tree | f1d50f373fd845f6d27dc51b10e3329eb4f3bff9 /sound/soc | |
parent | f20eca1c061ba6a56cb1fee09b0903a1befe149a (diff) | |
parent | ff7dc6af1319b49c75a947f1fc7ec51368d03e9a (diff) |
Merge remote-tracking branch 'asoc/topic/da7210' into asoc-next
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/da7210.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c index af5db708051..843c1eb72fa 100644 --- a/sound/soc/codecs/da7210.c +++ b/sound/soc/codecs/da7210.c @@ -1231,7 +1231,7 @@ static int __devinit da7210_i2c_probe(struct i2c_client *i2c, i2c_set_clientdata(i2c, da7210); - da7210->regmap = regmap_init_i2c(i2c, &da7210_regmap_config_i2c); + da7210->regmap = devm_regmap_init_i2c(i2c, &da7210_regmap_config_i2c); if (IS_ERR(da7210->regmap)) { ret = PTR_ERR(da7210->regmap); dev_err(&i2c->dev, "regmap_init() failed: %d\n", ret); @@ -1245,24 +1245,15 @@ static int __devinit da7210_i2c_probe(struct i2c_client *i2c, ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_da7210, &da7210_dai, 1); - if (ret < 0) { + if (ret < 0) dev_err(&i2c->dev, "Failed to register codec: %d\n", ret); - goto err_regmap; - } - return ret; - -err_regmap: - regmap_exit(da7210->regmap); return ret; } static int __devexit da7210_i2c_remove(struct i2c_client *client) { - struct da7210_priv *da7210 = i2c_get_clientdata(client); - snd_soc_unregister_codec(&client->dev); - regmap_exit(da7210->regmap); return 0; } @@ -1346,24 +1337,15 @@ static int __devinit da7210_spi_probe(struct spi_device *spi) if (ret != 0) dev_warn(&spi->dev, "Failed to apply regmap patch: %d\n", ret); - ret = snd_soc_register_codec(&spi->dev, + ret = snd_soc_register_codec(&spi->dev, &soc_codec_dev_da7210, &da7210_dai, 1); - if (ret < 0) - goto err_regmap; - - return ret; - -err_regmap: - regmap_exit(da7210->regmap); return ret; } static int __devexit da7210_spi_remove(struct spi_device *spi) { - struct da7210_priv *da7210 = spi_get_drvdata(spi); snd_soc_unregister_codec(&spi->dev); - regmap_exit(da7210->regmap); return 0; } |