diff options
-rw-r--r-- | linux/drivers/media/dvb/b2c2/flexcop-pci.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/dvb-usb.h | 4 | ||||
-rw-r--r-- | linux/drivers/media/radio/radio-si470x.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88.h | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx.h | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/meye.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/stk-webcam.c | 8 | ||||
-rw-r--r-- | linux/drivers/media/video/usbvision/usbvision-video.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/v4l2-dev.c | 7 | ||||
-rw-r--r-- | linux/drivers/media/video/v4l2-ioctl.c | 5 | ||||
-rw-r--r-- | linux/drivers/media/video/zoran/zoran_driver.c | 7 | ||||
-rw-r--r-- | v4l/compat.h | 8 |
12 files changed, 18 insertions, 41 deletions
diff --git a/linux/drivers/media/dvb/b2c2/flexcop-pci.c b/linux/drivers/media/dvb/b2c2/flexcop-pci.c index 5baf9ded9..2905ffccf 100644 --- a/linux/drivers/media/dvb/b2c2/flexcop-pci.c +++ b/linux/drivers/media/dvb/b2c2/flexcop-pci.c @@ -67,11 +67,7 @@ struct flexcop_pci { unsigned long last_irq; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) - struct work_struct irq_check_work; -#else struct delayed_work irq_check_work; -#endif struct flexcop_device *fc_dev; }; diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb.h b/linux/drivers/media/dvb/dvb-usb/dvb-usb.h index 72503e2da..1279046e0 100644 --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb.h +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb.h @@ -364,11 +364,7 @@ struct dvb_usb_device { /* remote control */ struct input_dev *rc_input_dev; char rc_phys[64]; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) - struct work_struct rc_query_work; -#else struct delayed_work rc_query_work; -#endif u32 last_event; int last_state; diff --git a/linux/drivers/media/radio/radio-si470x.c b/linux/drivers/media/radio/radio-si470x.c index b0a1e5832..a5ba4bf21 100644 --- a/linux/drivers/media/radio/radio-si470x.c +++ b/linux/drivers/media/radio/radio-si470x.c @@ -459,11 +459,7 @@ struct si470x_device { unsigned short registers[RADIO_REGISTER_NUM]; /* RDS receive buffer */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) - struct work_struct work; -#else struct delayed_work work; -#endif wait_queue_head_t read_queue; struct mutex lock; /* buffer locking */ unsigned char *buffer; /* size is always multiple of three */ diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h index d641c24c3..2227d93c7 100644 --- a/linux/drivers/media/video/cx88/cx88.h +++ b/linux/drivers/media/video/cx88/cx88.h @@ -306,7 +306,6 @@ struct cx88_dmaqueue { struct btcx_riscmem stopper; u32 count; }; -struct cx88_core; struct cx88_core { struct list_head devlist; diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h index 235b63499..43c537e66 100644 --- a/linux/drivers/media/video/em28xx/em28xx.h +++ b/linux/drivers/media/video/em28xx/em28xx.h @@ -571,11 +571,7 @@ struct em28xx { /* Snapshot button */ char snapshot_button_path[30]; /* path of the input dev */ struct input_dev *sbutton_input_dev; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) - struct work_struct sbutton_query_work; -#else struct delayed_work sbutton_query_work; -#endif struct em28xx_dvb *dvb; }; diff --git a/linux/drivers/media/video/meye.c b/linux/drivers/media/video/meye.c index 323aa378b..0fd646f7c 100644 --- a/linux/drivers/media/video/meye.c +++ b/linux/drivers/media/video/meye.c @@ -1451,10 +1451,6 @@ static int vidioc_querybuf(struct file *file, void *fh, struct v4l2_buffer *buf) if (index < 0 || index >= gbuffers) return -EINVAL; - memset(buf, 0, sizeof(*buf)); - - buf->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - buf->index = index; buf->bytesused = meye.grab_buffer[index].size; buf->flags = V4L2_BUF_FLAG_MAPPED; diff --git a/linux/drivers/media/video/stk-webcam.c b/linux/drivers/media/video/stk-webcam.c index 3af084640..52bf877bf 100644 --- a/linux/drivers/media/video/stk-webcam.c +++ b/linux/drivers/media/video/stk-webcam.c @@ -1140,16 +1140,10 @@ static int stk_vidioc_reqbufs(struct file *filp, static int stk_vidioc_querybuf(struct file *filp, void *priv, struct v4l2_buffer *buf) { - int index; struct stk_camera *dev = priv; struct stk_sio_buffer *sbuf; - if (buf->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) - return -EINVAL; - - index = buf->index; - - if (index < 0 || index >= dev->n_sbufs) + if (buf->index < 0 || buf->index >= dev->n_sbufs) return -EINVAL; sbuf = dev->sio_bufs + buf->index; *buf = sbuf->v4lbuf; diff --git a/linux/drivers/media/video/usbvision/usbvision-video.c b/linux/drivers/media/video/usbvision/usbvision-video.c index 33d79a5da..863fcb316 100644 --- a/linux/drivers/media/video/usbvision/usbvision-video.c +++ b/linux/drivers/media/video/usbvision/usbvision-video.c @@ -788,9 +788,6 @@ static int vidioc_querybuf (struct file *file, /* FIXME : must control that buffers are mapped (VIDIOC_REQBUFS has been called) */ - if(vb->type != V4L2_CAP_VIDEO_CAPTURE) { - return -EINVAL; - } if(vb->index>=usbvision->num_frames) { return -EINVAL; } diff --git a/linux/drivers/media/video/v4l2-dev.c b/linux/drivers/media/video/v4l2-dev.c index e6dc1279a..861e3194f 100644 --- a/linux/drivers/media/video/v4l2-dev.c +++ b/linux/drivers/media/video/v4l2-dev.c @@ -404,12 +404,11 @@ int video_register_device_index(struct video_device *vdev, int type, int nr, /* A minor value of -1 marks this video device as never having been registered */ - if (vdev) - vdev->minor = -1; + vdev->minor = -1; /* the release callback MUST be present */ - WARN_ON(!vdev || !vdev->release); - if (!vdev || !vdev->release) + WARN_ON(!vdev->release); + if (!vdev->release) return -EINVAL; /* Part 1: check device type */ diff --git a/linux/drivers/media/video/v4l2-ioctl.c b/linux/drivers/media/video/v4l2-ioctl.c index ec139df5c..f2d74fedf 100644 --- a/linux/drivers/media/video/v4l2-ioctl.c +++ b/linux/drivers/media/video/v4l2-ioctl.c @@ -970,6 +970,11 @@ static long __video_do_ioctl(struct file *file, if (ret) break; + /* Zero out all fields starting with bytesysed, which is + * everything but index and type. */ + memset(0, &p->bytesused, + sizeof(*p) - offsetof(typeof(*p), bytesused)); + ret = ops->vidioc_querybuf(file, fh, p); if (!ret) dbgbuf(cmd, vfd, p); diff --git a/linux/drivers/media/video/zoran/zoran_driver.c b/linux/drivers/media/video/zoran/zoran_driver.c index 7ddbdf37d..8eda83b06 100644 --- a/linux/drivers/media/video/zoran/zoran_driver.c +++ b/linux/drivers/media/video/zoran/zoran_driver.c @@ -2499,12 +2499,7 @@ static int zoran_querybuf(struct file *file, void *__fh, struct v4l2_buffer *buf { struct zoran_fh *fh = __fh; struct zoran *zr = fh->zr; - __u32 type = buf->type; - int index = buf->index, res; - - memset(buf, 0, sizeof(*buf)); - buf->type = type; - buf->index = index; + int res; mutex_lock(&zr->resource_lock); res = zoran_v4l2_buffer_status(file, buf, buf->index); diff --git a/v4l/compat.h b/v4l/compat.h index b00e8eaf3..207cd3033 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -5,6 +5,14 @@ #ifndef _COMPAT_H #define _COMPAT_H +/* In v2.6.19-rc6-118-g52bad64 struct work_struct was was changed to be only for + * non-delayed work and struct delayed_work was created for delayed work. This + * will rename the structures. Hopefully no one will decide to name something + * delayed_work in the same context as something named work_struct. */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) +#define delayed_work work_struct +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) #define KERN_CONT "" #endif |