Skip to content

Commit 44378cd

Browse files
Duy Nguyenbroonie
authored andcommitted
ASoC: da7213.c: add missing pm_runtime_disable()
da7213.c is missing pm_runtime_disable(), thus we will get below error when rmmod -> insmod. $ rmmod snd-soc-da7213.ko $ insmod snd-soc-da7213.ko da7213 0-001a: Unbalanced pm_runtime_enable!" [Kuninori adjusted to latest upstream] Signed-off-by: Duy Nguyen <[email protected]> Signed-off-by: Kuninori Morimoto <[email protected]> Tested-by: Khanh Le <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent f6887a7 commit 44378cd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sound/soc/codecs/da7213.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2022,6 +2022,11 @@ static int da7213_i2c_probe(struct i2c_client *i2c)
20222022
return ret;
20232023
}
20242024

2025+
static void da7213_i2c_remove(struct i2c_client *i2c)
2026+
{
2027+
pm_runtime_disable(&i2c->dev);
2028+
}
2029+
20252030
static int __maybe_unused da7213_runtime_suspend(struct device *dev)
20262031
{
20272032
struct da7213_priv *da7213 = dev_get_drvdata(dev);
@@ -2065,6 +2070,7 @@ static struct i2c_driver da7213_i2c_driver = {
20652070
.pm = &da7213_pm,
20662071
},
20672072
.probe_new = da7213_i2c_probe,
2073+
.remove = da7213_i2c_remove,
20682074
.id_table = da7213_i2c_id,
20692075
};
20702076

0 commit comments

Comments
 (0)