From: Jacopo Mondi Date: Sun, 10 Aug 2025 01:30:02 +0000 (+0300) Subject: media: camss: Remove custom .release fop() X-Git-Tag: v6.18-rc1~133^2~418 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9c7ee499483d493152d5fd7cf477754099af14ed;p=thirdparty%2Fkernel%2Flinux.git media: camss: Remove custom .release fop() The 'file->private_data' pointer is reset in the vb2_fop_release() call path. For this reason a custom handler for the .release file operation is not needed and the driver can use vb2_fop_release() directly. Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/platform/qcom/camss/camss-video.c b/drivers/media/platform/qcom/camss/camss-video.c index c5d02f9ebc6aa..831486e14754a 100644 --- a/drivers/media/platform/qcom/camss/camss-video.c +++ b/drivers/media/platform/qcom/camss/camss-video.c @@ -604,20 +604,11 @@ static const struct v4l2_ioctl_ops msm_vid_ioctl_ops = { * V4L2 file operations */ -static int video_release(struct file *file) -{ - vb2_fop_release(file); - - file->private_data = NULL; - - return 0; -} - static const struct v4l2_file_operations msm_vid_fops = { .owner = THIS_MODULE, .unlocked_ioctl = video_ioctl2, .open = v4l2_fh_open, - .release = video_release, + .release = vb2_fop_release, .poll = vb2_fop_poll, .mmap = vb2_fop_mmap, .read = vb2_fop_read,