Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305535
b: refs/heads/master
c: 77caaba
h: refs/heads/master
i:
  305533: f7611b5
  305531: a0ab865
  305527: b47b120
  305519: dbc7b9c
  305503: 844480a
  305471: 9d7e205
  305407: 41e60bf
v: v3
  • Loading branch information
Mark Brown committed Apr 1, 2012
1 parent 59c5aa9 commit 1415f00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 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: e06ab3b8e82c89a8ada25f61fbd9f02d6ca3103f
refs/heads/master: 77caabaa74524dce5f83b93b8f0a6d0c1c5e860f
9 changes: 3 additions & 6 deletions trunk/sound/soc/codecs/wm5100.c
Original file line number Diff line number Diff line change
Expand Up @@ -2454,7 +2454,7 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,

wm5100->dev = &i2c->dev;

wm5100->regmap = regmap_init_i2c(i2c, &wm5100_regmap);
wm5100->regmap = devm_regmap_init_i2c(i2c, &wm5100_regmap);
if (IS_ERR(wm5100->regmap)) {
ret = PTR_ERR(wm5100->regmap);
dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
Expand All @@ -2479,15 +2479,15 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,
if (ret != 0) {
dev_err(&i2c->dev, "Failed to request core supplies: %d\n",
ret);
goto err_regmap;
goto err;
}

ret = regulator_bulk_enable(ARRAY_SIZE(wm5100->core_supplies),
wm5100->core_supplies);
if (ret != 0) {
dev_err(&i2c->dev, "Failed to enable core supplies: %d\n",
ret);
goto err_regmap;
goto err;
}

if (wm5100->pdata.ldo_ena) {
Expand Down Expand Up @@ -2660,8 +2660,6 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,
err_enable:
regulator_bulk_disable(ARRAY_SIZE(wm5100->core_supplies),
wm5100->core_supplies);
err_regmap:
regmap_exit(wm5100->regmap);
err:
return ret;
}
Expand All @@ -2682,7 +2680,6 @@ static __devexit int wm5100_i2c_remove(struct i2c_client *i2c)
gpio_set_value_cansleep(wm5100->pdata.ldo_ena, 0);
gpio_free(wm5100->pdata.ldo_ena);
}
regmap_exit(wm5100->regmap);

return 0;
}
Expand Down

0 comments on commit 1415f00

Please sign in to comment.