Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <duy.nguyen.rh@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Khanh Le <khanh.le.xr@renesas.com>
Link: https://lore.kernel.org/r/87mt3xg2tk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Duy Nguyen and committed by
Mark Brown
44378cd1 f6887a71

+6
+6
sound/soc/codecs/da7213.c
··· 2022 2022 return ret; 2023 2023 } 2024 2024 2025 + static void da7213_i2c_remove(struct i2c_client *i2c) 2026 + { 2027 + pm_runtime_disable(&i2c->dev); 2028 + } 2029 + 2025 2030 static int __maybe_unused da7213_runtime_suspend(struct device *dev) 2026 2031 { 2027 2032 struct da7213_priv *da7213 = dev_get_drvdata(dev); ··· 2070 2065 .pm = &da7213_pm, 2071 2066 }, 2072 2067 .probe_new = da7213_i2c_probe, 2068 + .remove = da7213_i2c_remove, 2073 2069 .id_table = da7213_i2c_id, 2074 2070 }; 2075 2071