]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ASoC: wm5100: add missed pm_runtime_disable
authorChuhong Yuan <hslester96@gmail.com>
Mon, 18 Nov 2019 07:37:07 +0000 (15:37 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 29 Jan 2020 05:00:31 +0000 (00:00 -0500)
BugLink: https://bugs.launchpad.net/bugs/1860490
[ Upstream commit b1176bbb70866f24099cd2720283c7219fb4a81c ]

The driver forgets to call pm_runtime_disable in remove and
probe failure.
Add the calls to fix it.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20191118073707.28298-1-hslester96@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
sound/soc/codecs/wm5100.c

index 4af0e519e6235f52f752e1b730d1d1eac05c4de8..91cc63c5a51fadfb78c0ddd11fe2a50c009b3399 100644 (file)
@@ -2617,6 +2617,7 @@ static int wm5100_i2c_probe(struct i2c_client *i2c,
        return ret;
 
 err_reset:
+       pm_runtime_disable(&i2c->dev);
        if (i2c->irq)
                free_irq(i2c->irq, wm5100);
        wm5100_free_gpio(i2c);
@@ -2640,6 +2641,7 @@ static int wm5100_i2c_remove(struct i2c_client *i2c)
 {
        struct wm5100_priv *wm5100 = i2c_get_clientdata(i2c);
 
+       pm_runtime_disable(&i2c->dev);
        if (i2c->irq)
                free_irq(i2c->irq, wm5100);
        wm5100_free_gpio(i2c);