summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm2200.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2019-11-22 19:56:02 +0000
committerMark Brown <broonie@kernel.org>2019-11-22 19:56:02 +0000
commit8c4d2a0bfbd27d030e4652b714cd5a1598f3559b (patch)
treed8ea72d906a690109d2f7aeeb2dc9ec529c0d5a6 /sound/soc/codecs/wm2200.c
parent3701d2cb87671c227f1aa59226c9a01e9f01c2ea (diff)
parent39870b0dec68ed7dd814beb697e541670975c7d8 (diff)
Merge branch 'asoc-5.5' into asoc-next
Diffstat (limited to 'sound/soc/codecs/wm2200.c')
-rw-r--r--sound/soc/codecs/wm2200.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c
index cf64e109c658..7b087d94141b 100644
--- a/sound/soc/codecs/wm2200.c
+++ b/sound/soc/codecs/wm2200.c
@@ -2410,6 +2410,8 @@ static int wm2200_i2c_probe(struct i2c_client *i2c,
err_pm_runtime:
pm_runtime_disable(&i2c->dev);
+ if (i2c->irq)
+ free_irq(i2c->irq, wm2200);
err_reset:
if (wm2200->pdata.reset)
gpio_set_value_cansleep(wm2200->pdata.reset, 0);
@@ -2426,12 +2428,15 @@ static int wm2200_i2c_remove(struct i2c_client *i2c)
{
struct wm2200_priv *wm2200 = i2c_get_clientdata(i2c);
+ pm_runtime_disable(&i2c->dev);
if (i2c->irq)
free_irq(i2c->irq, wm2200);
if (wm2200->pdata.reset)
gpio_set_value_cansleep(wm2200->pdata.reset, 0);
if (wm2200->pdata.ldo_ena)
gpio_set_value_cansleep(wm2200->pdata.ldo_ena, 0);
+ regulator_bulk_disable(ARRAY_SIZE(wm2200->core_supplies),
+ wm2200->core_supplies);
return 0;
}