Commit 078ff795 authored by Douglas Schilling Landgraf's avatar Douglas Schilling Landgraf Committed by Mauro Carvalho Chehab

V4L/DVB (7402): add macro validation for v4l_compat_ioctl32

Added macro CONFIG_COMPAT for v4l_compat_ioctl32.
Signed-off-by: default avatarDouglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 03dea86d
...@@ -438,7 +438,9 @@ static const struct file_operations usb_dsbr100_fops = { ...@@ -438,7 +438,9 @@ static const struct file_operations usb_dsbr100_fops = {
.open = usb_dsbr100_open, .open = usb_dsbr100_open,
.release = usb_dsbr100_close, .release = usb_dsbr100_close,
.ioctl = video_ioctl2, .ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -221,7 +221,9 @@ static const struct file_operations pcm20_fops = { ...@@ -221,7 +221,9 @@ static const struct file_operations pcm20_fops = {
.open = video_exclusive_open, .open = video_exclusive_open,
.release = video_exclusive_release, .release = video_exclusive_release,
.ioctl = pcm20_ioctl, .ioctl = pcm20_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -382,7 +382,9 @@ static const struct file_operations rtrack_fops = { ...@@ -382,7 +382,9 @@ static const struct file_operations rtrack_fops = {
.open = video_exclusive_open, .open = video_exclusive_open,
.release = video_exclusive_release, .release = video_exclusive_release,
.ioctl = video_ioctl2, .ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -346,7 +346,9 @@ static const struct file_operations aztech_fops = { ...@@ -346,7 +346,9 @@ static const struct file_operations aztech_fops = {
.open = video_exclusive_open, .open = video_exclusive_open,
.release = video_exclusive_release, .release = video_exclusive_release,
.ioctl = video_ioctl2, .ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -563,7 +563,9 @@ static const struct file_operations cadet_fops = { ...@@ -563,7 +563,9 @@ static const struct file_operations cadet_fops = {
.read = cadet_read, .read = cadet_read,
.ioctl = video_ioctl2, .ioctl = video_ioctl2,
.poll = cadet_poll, .poll = cadet_poll,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -368,7 +368,9 @@ static const struct file_operations gemtek_pci_fops = { ...@@ -368,7 +368,9 @@ static const struct file_operations gemtek_pci_fops = {
.open = video_exclusive_open, .open = video_exclusive_open,
.release = video_exclusive_release, .release = video_exclusive_release,
.ioctl = video_ioctl2, .ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -397,7 +397,9 @@ static const struct file_operations gemtek_fops = { ...@@ -397,7 +397,9 @@ static const struct file_operations gemtek_fops = {
.open = video_exclusive_open, .open = video_exclusive_open,
.release = video_exclusive_release, .release = video_exclusive_release,
.ioctl = video_ioctl2, .ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek .llseek = no_llseek
}; };
......
...@@ -100,7 +100,9 @@ static const struct file_operations maestro_fops = { ...@@ -100,7 +100,9 @@ static const struct file_operations maestro_fops = {
.open = video_exclusive_open, .open = video_exclusive_open,
.release = video_exclusive_release, .release = video_exclusive_release,
.ioctl = video_ioctl2, .ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -103,7 +103,9 @@ static const struct file_operations maxiradio_fops = { ...@@ -103,7 +103,9 @@ static const struct file_operations maxiradio_fops = {
.open = video_exclusive_open, .open = video_exclusive_open,
.release = video_exclusive_release, .release = video_exclusive_release,
.ioctl = video_ioctl2, .ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -288,7 +288,9 @@ static const struct file_operations rtrack2_fops = { ...@@ -288,7 +288,9 @@ static const struct file_operations rtrack2_fops = {
.open = video_exclusive_open, .open = video_exclusive_open,
.release = video_exclusive_release, .release = video_exclusive_release,
.ioctl = video_ioctl2, .ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -288,7 +288,9 @@ static const struct file_operations fmi_fops = { ...@@ -288,7 +288,9 @@ static const struct file_operations fmi_fops = {
.open = video_exclusive_open, .open = video_exclusive_open,
.release = video_exclusive_release, .release = video_exclusive_release,
.ioctl = video_ioctl2, .ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -404,7 +404,9 @@ static const struct file_operations fmr2_fops = { ...@@ -404,7 +404,9 @@ static const struct file_operations fmr2_fops = {
.open = video_exclusive_open, .open = video_exclusive_open,
.release = video_exclusive_release, .release = video_exclusive_release,
.ioctl = video_ioctl2, .ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -1051,7 +1051,9 @@ static const struct file_operations si470x_fops = { ...@@ -1051,7 +1051,9 @@ static const struct file_operations si470x_fops = {
.read = si470x_fops_read, .read = si470x_fops_read,
.poll = si470x_fops_poll, .poll = si470x_fops_poll,
.ioctl = video_ioctl2, .ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.open = si470x_fops_open, .open = si470x_fops_open,
.release = si470x_fops_release, .release = si470x_fops_release,
}; };
......
...@@ -360,7 +360,9 @@ static const struct file_operations terratec_fops = { ...@@ -360,7 +360,9 @@ static const struct file_operations terratec_fops = {
.open = video_exclusive_open, .open = video_exclusive_open,
.release = video_exclusive_release, .release = video_exclusive_release,
.ioctl = video_ioctl2, .ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -340,7 +340,9 @@ static const struct file_operations trust_fops = { ...@@ -340,7 +340,9 @@ static const struct file_operations trust_fops = {
.open = video_exclusive_open, .open = video_exclusive_open,
.release = video_exclusive_release, .release = video_exclusive_release,
.ioctl = video_ioctl2, .ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -340,7 +340,9 @@ static const struct file_operations typhoon_fops = { ...@@ -340,7 +340,9 @@ static const struct file_operations typhoon_fops = {
.open = video_exclusive_open, .open = video_exclusive_open,
.release = video_exclusive_release, .release = video_exclusive_release,
.ioctl = video_ioctl2, .ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -401,7 +401,9 @@ static const struct file_operations zoltrix_fops = ...@@ -401,7 +401,9 @@ static const struct file_operations zoltrix_fops =
.open = video_exclusive_open, .open = video_exclusive_open,
.release = video_exclusive_release, .release = video_exclusive_release,
.ioctl = video_ioctl2, .ioctl = video_ioctl2,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -747,7 +747,9 @@ static const struct file_operations ar_fops = { ...@@ -747,7 +747,9 @@ static const struct file_operations ar_fops = {
.release = video_exclusive_release, .release = video_exclusive_release,
.read = ar_read, .read = ar_read,
.ioctl = ar_ioctl, .ioctl = ar_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -898,7 +898,9 @@ static const struct file_operations qcam_fops = { ...@@ -898,7 +898,9 @@ static const struct file_operations qcam_fops = {
.open = video_exclusive_open, .open = video_exclusive_open,
.release = video_exclusive_release, .release = video_exclusive_release,
.ioctl = qcam_ioctl, .ioctl = qcam_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.read = qcam_read, .read = qcam_read,
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -689,7 +689,9 @@ static const struct file_operations qcam_fops = { ...@@ -689,7 +689,9 @@ static const struct file_operations qcam_fops = {
.open = video_exclusive_open, .open = video_exclusive_open,
.release = video_exclusive_release, .release = video_exclusive_release,
.ioctl = qcam_ioctl, .ioctl = qcam_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.read = qcam_read, .read = qcam_read,
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -3792,7 +3792,9 @@ static const struct file_operations cpia_fops = { ...@@ -3792,7 +3792,9 @@ static const struct file_operations cpia_fops = {
.read = cpia_read, .read = cpia_read,
.mmap = cpia_mmap, .mmap = cpia_mmap,
.ioctl = cpia_ioctl, .ioctl = cpia_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -1927,7 +1927,9 @@ static const struct file_operations fops_template = { ...@@ -1927,7 +1927,9 @@ static const struct file_operations fops_template = {
.poll = cpia2_v4l_poll, .poll = cpia2_v4l_poll,
.ioctl = cpia2_ioctl, .ioctl = cpia2_ioctl,
.llseek = no_llseek, .llseek = no_llseek,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.mmap = cpia2_mmap, .mmap = cpia2_mmap,
}; };
......
...@@ -2523,7 +2523,9 @@ static const struct file_operations et61x251_fops = { ...@@ -2523,7 +2523,9 @@ static const struct file_operations et61x251_fops = {
.open = et61x251_open, .open = et61x251_open,
.release = et61x251_release, .release = et61x251_release,
.ioctl = et61x251_ioctl, .ioctl = et61x251_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.read = et61x251_read, .read = et61x251_read,
.poll = et61x251_poll, .poll = et61x251_poll,
.mmap = et61x251_mmap, .mmap = et61x251_mmap,
......
...@@ -1761,7 +1761,9 @@ static const struct file_operations meye_fops = { ...@@ -1761,7 +1761,9 @@ static const struct file_operations meye_fops = {
.release = meye_release, .release = meye_release,
.mmap = meye_mmap, .mmap = meye_mmap,
.ioctl = meye_ioctl, .ioctl = meye_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.poll = meye_poll, .poll = meye_poll,
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -4659,7 +4659,9 @@ static const struct file_operations ov511_fops = { ...@@ -4659,7 +4659,9 @@ static const struct file_operations ov511_fops = {
.read = ov51x_v4l1_read, .read = ov51x_v4l1_read,
.mmap = ov51x_v4l1_mmap, .mmap = ov51x_v4l1_mmap,
.ioctl = ov51x_v4l1_ioctl, .ioctl = ov51x_v4l1_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -885,7 +885,9 @@ static const struct file_operations pms_fops = { ...@@ -885,7 +885,9 @@ static const struct file_operations pms_fops = {
.open = video_exclusive_open, .open = video_exclusive_open,
.release = video_exclusive_release, .release = video_exclusive_release,
.ioctl = pms_ioctl, .ioctl = pms_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.read = pms_read, .read = pms_read,
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -159,7 +159,9 @@ static const struct file_operations pwc_fops = { ...@@ -159,7 +159,9 @@ static const struct file_operations pwc_fops = {
.poll = pwc_video_poll, .poll = pwc_video_poll,
.mmap = pwc_video_mmap, .mmap = pwc_video_mmap,
.ioctl = pwc_video_ioctl, .ioctl = pwc_video_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
static struct video_device pwc_template = { static struct video_device pwc_template = {
......
...@@ -701,7 +701,9 @@ static const struct file_operations saa_fops = { ...@@ -701,7 +701,9 @@ static const struct file_operations saa_fops = {
.open = saa5249_open, .open = saa5249_open,
.release = saa5249_release, .release = saa5249_release,
.ioctl = saa5249_ioctl, .ioctl = saa5249_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -1224,7 +1224,9 @@ static const struct file_operations se401_fops = { ...@@ -1224,7 +1224,9 @@ static const struct file_operations se401_fops = {
.read = se401_read, .read = se401_read,
.mmap = se401_mmap, .mmap = se401_mmap,
.ioctl = se401_ioctl, .ioctl = se401_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
static struct video_device se401_template = { static struct video_device se401_template = {
......
...@@ -3224,7 +3224,9 @@ static const struct file_operations sn9c102_fops = { ...@@ -3224,7 +3224,9 @@ static const struct file_operations sn9c102_fops = {
.open = sn9c102_open, .open = sn9c102_open,
.release = sn9c102_release, .release = sn9c102_release,
.ioctl = sn9c102_ioctl, .ioctl = sn9c102_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.read = sn9c102_read, .read = sn9c102_read,
.poll = sn9c102_poll, .poll = sn9c102_poll,
.mmap = sn9c102_mmap, .mmap = sn9c102_mmap,
......
...@@ -1906,7 +1906,9 @@ static const struct file_operations saa_fops = { ...@@ -1906,7 +1906,9 @@ static const struct file_operations saa_fops = {
.open = saa_open, .open = saa_open,
.release = saa_release, .release = saa_release,
.ioctl = saa_ioctl, .ioctl = saa_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.read = saa_read, .read = saa_read,
.llseek = no_llseek, .llseek = no_llseek,
.write = saa_write, .write = saa_write,
......
...@@ -1394,7 +1394,9 @@ static const struct file_operations stv680_fops = { ...@@ -1394,7 +1394,9 @@ static const struct file_operations stv680_fops = {
.read = stv680_read, .read = stv680_read,
.mmap = stv680_mmap, .mmap = stv680_mmap,
.ioctl = stv680_ioctl, .ioctl = stv680_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
static struct video_device stv680_template = { static struct video_device stv680_template = {
......
...@@ -946,7 +946,9 @@ static const struct file_operations usbvideo_fops = { ...@@ -946,7 +946,9 @@ static const struct file_operations usbvideo_fops = {
.read = usbvideo_v4l_read, .read = usbvideo_v4l_read,
.mmap = usbvideo_v4l_mmap, .mmap = usbvideo_v4l_mmap,
.ioctl = usbvideo_v4l_ioctl, .ioctl = usbvideo_v4l_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
static const struct video_device usbvideo_template = { static const struct video_device usbvideo_template = {
......
...@@ -1066,7 +1066,9 @@ static const struct file_operations vicam_fops = { ...@@ -1066,7 +1066,9 @@ static const struct file_operations vicam_fops = {
.read = vicam_read, .read = vicam_read,
.mmap = vicam_mmap, .mmap = vicam_mmap,
.ioctl = vicam_ioctl, .ioctl = vicam_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -188,7 +188,9 @@ static const struct file_operations w9966_fops = { ...@@ -188,7 +188,9 @@ static const struct file_operations w9966_fops = {
.open = video_exclusive_open, .open = video_exclusive_open,
.release = video_exclusive_release, .release = video_exclusive_release,
.ioctl = w9966_v4l_ioctl, .ioctl = w9966_v4l_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.read = w9966_v4l_read, .read = w9966_v4l_read,
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -3461,7 +3461,9 @@ static const struct file_operations w9968cf_fops = { ...@@ -3461,7 +3461,9 @@ static const struct file_operations w9968cf_fops = {
.release = w9968cf_release, .release = w9968cf_release,
.read = w9968cf_read, .read = w9968cf_read,
.ioctl = w9968cf_ioctl, .ioctl = w9968cf_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.mmap = w9968cf_mmap, .mmap = w9968cf_mmap,
.llseek = no_llseek, .llseek = no_llseek,
}; };
......
...@@ -1925,7 +1925,9 @@ static const struct file_operations zc0301_fops = { ...@@ -1925,7 +1925,9 @@ static const struct file_operations zc0301_fops = {
.open = zc0301_open, .open = zc0301_open,
.release = zc0301_release, .release = zc0301_release,
.ioctl = zc0301_ioctl, .ioctl = zc0301_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.read = zc0301_read, .read = zc0301_read,
.poll = zc0301_poll, .poll = zc0301_poll,
.mmap = zc0301_mmap, .mmap = zc0301_mmap,
......
...@@ -4644,7 +4644,9 @@ static const struct file_operations zoran_fops = { ...@@ -4644,7 +4644,9 @@ static const struct file_operations zoran_fops = {
.open = zoran_open, .open = zoran_open,
.release = zoran_close, .release = zoran_close,
.ioctl = zoran_ioctl, .ioctl = zoran_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = v4l_compat_ioctl32, .compat_ioctl = v4l_compat_ioctl32,
#endif
.llseek = no_llseek, .llseek = no_llseek,
.read = zoran_read, .read = zoran_read,
.write = zoran_write, .write = zoran_write,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment