Skip to contentSkip to conversation

ASoC: da7213.c: add missing pm_runtime_disable()

PATCH In review Kuninori Morimoto 2 participants 2 messages Mar 28, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ASoC: da7213.c: add missing pm_runtime_disable()

From: Duy Nguyen <[email protected]>

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]

---
v1 -> v2
- add missing From

 sound/soc/codecs/da7213.c | 6 ++++++
 1 file changed, 6 insertions(+)
sound/soc/codecs/da7213.c +6 -0
index 0068780fe0a7..1c1f211a8e2e 100644
@@ -2022,6 +2022,11 @@ static int da7213_i2c_probe(struct i2c_client *i2c)
 	return ret;
 }
 
+static void da7213_i2c_remove(struct i2c_client *i2c)
+{
+	pm_runtime_disable(&i2c->dev);
+}
+
 static int __maybe_unused da7213_runtime_suspend(struct device *dev)
 {
 	struct da7213_priv *da7213 = dev_get_drvdata(dev);
@@ -2065,6 +2070,7 @@ static struct i2c_driver da7213_i2c_driver = {
 		.pm = &da7213_pm,
 	},
 	.probe_new	= da7213_i2c_probe,
+	.remove		= da7213_i2c_remove,
 	.id_table	= da7213_i2c_id,
 };
 
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 8 lines · Kuninori Morimoto

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!"

[...]

Applied to

broonie/sound.git for-next

Thanks!

[1/1] ASoC: da7213.c: add missing pm_runtime_disable()

      commit: 44378cd113e5f15bb0a89f5ac5a0e687b52feb90

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark