* [PATCH] media: video-i2c: use vb2_video_unregister_device on driver removal
@ 2026-05-09 16:10 Arash Golgol
0 siblings, 0 replies; only message in thread
From: Arash Golgol @ 2026-05-09 16:10 UTC (permalink / raw)
To: linux-media; +Cc: matt, mchehab, Arash Golgol
The driver uses vb2_fop_release() as its file release operation, so
vb2_video_unregister_device() should be used instead of
video_unregister_device() during driver removal.
This ensures that the vb2 queue is properly disconnected before the
video device is unregistered.
Signed-off-by: Arash Golgol <arash.golgol@gmail.com>
---
drivers/media/i2c/video-i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c
index b2db0dd64a5d..5e11758ffa56 100644
--- a/drivers/media/i2c/video-i2c.c
+++ b/drivers/media/i2c/video-i2c.c
@@ -888,7 +888,7 @@ static void video_i2c_remove(struct i2c_client *client)
if (data->chip->set_power)
data->chip->set_power(data, false);
- video_unregister_device(&data->vdev);
+ vb2_video_unregister_device(&data->vdev);
}
#ifdef CONFIG_PM
--
2.34.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-09 16:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-09 16:10 [PATCH] media: video-i2c: use vb2_video_unregister_device on driver removal Arash Golgol
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox