Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342931
b: refs/heads/master
c: 29998eb
h: refs/heads/master
i:
  342929: 9512ded
  342927: df03044
v: v3
  • Loading branch information
Mark Brown committed Dec 9, 2012
1 parent fb907cf commit 1d461cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 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: 4301aecbdfd2616c500ef629a463638dcd573a72
refs/heads/master: 29998eb6180d7c7a45c48d629603b4ca2a7d19ec
7 changes: 2 additions & 5 deletions trunk/sound/soc/codecs/max9768.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,20 +187,18 @@ 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;
}

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);
Expand All @@ -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);
Expand Down

0 comments on commit 1d461cf

Please sign in to comment.