Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: sh_veu: convert to struct v4l2_fh

This driver didn't use struct v4l2_fh, so add it.

This is a very basic conversion. I can't test this on real hardware,
so I didn't dare to also convert the driver to start using the
v4l2-mem2mem ioctl/fop helpers.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
610fce53 3c135050

+5
+5
drivers/media/platform/sh_veu.c
··· 81 81 struct sh_veu_dev; 82 82 83 83 struct sh_veu_file { 84 + struct v4l2_fh fh; 84 85 struct sh_veu_dev *veu_dev; 85 86 bool cfg_needed; 86 87 }; ··· 962 961 if (!veu_file) 963 962 return -ENOMEM; 964 963 964 + v4l2_fh_init(&veu_file->fh, video_devdata(file)); 965 965 veu_file->veu_dev = veu; 966 966 veu_file->cfg_needed = true; 967 967 968 968 file->private_data = veu_file; 969 969 970 970 pm_runtime_get_sync(veu->dev); 971 + v4l2_fh_add(&veu_file->fh); 971 972 972 973 dev_dbg(veu->dev, "Created instance %p\n", veu_file); 973 974 ··· 999 996 } 1000 997 1001 998 pm_runtime_put(veu->dev); 999 + v4l2_fh_del(&veu_file->fh); 1000 + v4l2_fh_exit(&veu_file->fh); 1002 1001 1003 1002 kfree(veu_file); 1004 1003