ARM Sunxi Platform Development
 help / color / mirror / Atom feed
* [PATCH] media: sun4i-csi: Fix 'Unbalanced pm_runtime_enable!'
@ 2023-01-07  8:37 Oleg Verych
  2023-01-09 20:24 ` [PATCH] media: sun4i-csi: Use CSI_INT_STA_REG name, fix typo in a comment Oleg Verych
  2023-01-16 23:22 ` [PATCH] doc sunxi: update CCU wiki page link in clocks.rst Oleg Verych
  0 siblings, 2 replies; 5+ messages in thread
From: Oleg Verych @ 2023-01-07  8:37 UTC (permalink / raw)
  To: open list:ARM/Allwinner sunXi SoC support
  Cc: Oleg Verych, Maxime Ripard, Mauro Carvalho Chehab,
	open list:ALLWINNER A10 CSI DRIVER

When removing the module, balance PM runtime enable with
the corresponding disable call.

Signed-off-by: Oleg Verych <olecom@gmail.com>
---

dmesg:
```
[   32.570802] i2c-core: driver [ov5640] registered
[   32.585345] sun4i-csi 1c09000.csi: Device registered as video0
[  396.520467] random: crng init done
[ 1603.050944] ov5640 2-003c: remove
[ 1603.051878] i2c-core: driver [ov5640] unregistered
...
[ 1603.108832] i2c-core: driver [ov5640] registered
[ 1603.119400] sun4i-csi 1c09000.csi: Device registered as video0
[ 1603.119984] sun4i-csi 1c09000.csi: Unbalanced pm_runtime_enable!
```

 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c b/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c
index 18e6c65f4..86c5235a0 100644
--- a/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c
+++ b/drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c
@@ -264,6 +264,7 @@ static int sun4i_csi_remove(struct platform_device *pdev)
 {
 	struct sun4i_csi *csi = platform_get_drvdata(pdev);
 
+	pm_runtime_disable(&pdev->dev);
 	v4l2_async_nf_unregister(&csi->notifier);
 	v4l2_async_nf_cleanup(&csi->notifier);
 	vb2_video_unregister_device(&csi->vdev);
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-01-16 23:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-07  8:37 [PATCH] media: sun4i-csi: Fix 'Unbalanced pm_runtime_enable!' Oleg Verych
2023-01-09 20:24 ` [PATCH] media: sun4i-csi: Use CSI_INT_STA_REG name, fix typo in a comment Oleg Verych
2023-01-16 19:07   ` Sakari Ailus
2023-01-16 23:03     ` Oleg Verych
2023-01-16 23:22 ` [PATCH] doc sunxi: update CCU wiki page link in clocks.rst Oleg Verych

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox