From: Arash Golgol Date: Sat, 9 May 2026 16:10:13 +0000 (+0330) Subject: media: video-i2c: use vb2_video_unregister_device on driver removal X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=56384b486b80ce4a2bc93689aae49995f908f90d;p=thirdparty%2Fkernel%2Flinux.git media: video-i2c: use vb2_video_unregister_device on driver removal 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 Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c index fef3993f4e2d..9c47f4aaa359 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