Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342959
b: refs/heads/master
c: 58f4f79
h: refs/heads/master
i:
  342957: 290d0cc
  342955: 52de818
  342951: 44d7023
  342943: 56b989e
v: v3
  • Loading branch information
Mark Brown committed Dec 9, 2012
1 parent d79cf58 commit 830f6df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fa5236985b108250de81e7384c62e3abc9ff3a71
refs/heads/master: 58f4f795b4ad3f47b5b6173a4d3d7c34eb15af84
14 changes: 2 additions & 12 deletions trunk/sound/soc/codecs/wm8988.c
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ static int __devinit wm8988_spi_probe(struct spi_device *spi)
if (wm8988 == NULL)
return -ENOMEM;

wm8988->regmap = regmap_init_spi(spi, &wm8988_regmap);
wm8988->regmap = devm_regmap_init_spi(spi, &wm8988_regmap);
if (IS_ERR(wm8988->regmap)) {
ret = PTR_ERR(wm8988->regmap);
dev_err(&spi->dev, "Failed to init regmap: %d\n", ret);
Expand All @@ -893,17 +893,12 @@ static int __devinit wm8988_spi_probe(struct spi_device *spi)

ret = snd_soc_register_codec(&spi->dev,
&soc_codec_dev_wm8988, &wm8988_dai, 1);
if (ret != 0)
regmap_exit(wm8988->regmap);

return ret;
}

static int __devexit wm8988_spi_remove(struct spi_device *spi)
{
struct wm8988_priv *wm8988 = spi_get_drvdata(spi);
snd_soc_unregister_codec(&spi->dev);
regmap_exit(wm8988->regmap);
return 0;
}

Expand Down Expand Up @@ -931,7 +926,7 @@ static __devinit int wm8988_i2c_probe(struct i2c_client *i2c,

i2c_set_clientdata(i2c, wm8988);

wm8988->regmap = regmap_init_i2c(i2c, &wm8988_regmap);
wm8988->regmap = devm_regmap_init_i2c(i2c, &wm8988_regmap);
if (IS_ERR(wm8988->regmap)) {
ret = PTR_ERR(wm8988->regmap);
dev_err(&i2c->dev, "Failed to init regmap: %d\n", ret);
Expand All @@ -940,17 +935,12 @@ static __devinit int wm8988_i2c_probe(struct i2c_client *i2c,

ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_wm8988, &wm8988_dai, 1);
if (ret != 0)
regmap_exit(wm8988->regmap);

return ret;
}

static __devexit int wm8988_i2c_remove(struct i2c_client *client)
{
struct wm8988_priv *wm8988 = i2c_get_clientdata(client);
snd_soc_unregister_codec(&client->dev);
regmap_exit(wm8988->regmap);
return 0;
}

Expand Down

0 comments on commit 830f6df

Please sign in to comment.