diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2016-04-15 09:15:05 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-07-08 14:45:07 -0300 |
commit | 36c0f8b32c4bd4f668cedfba6d97afaa84f055fb (patch) | |
tree | fb65309d392241a0ae6733346b38145be971274f /drivers/media/usb | |
parent | 2548fee63d9eb43299dacd0ca30dd9d8f407d795 (diff) | |
download | linux-36c0f8b32c4bd4f668cedfba6d97afaa84f055fb.tar.gz linux-36c0f8b32c4bd4f668cedfba6d97afaa84f055fb.tar.bz2 linux-36c0f8b32c4bd4f668cedfba6d97afaa84f055fb.zip |
[media] vb2: replace void *alloc_ctxs by struct device *alloc_devs
Make this a proper typed array. Drop the old allocate context code since
that is no longer used.
Note that the memops functions now get a struct device pointer instead of
the struct device ** that was there initially (actually a void pointer to
a struct containing only a struct device pointer).
This code is now a lot cleaner.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r-- | drivers/media/usb/airspy/airspy.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/au0828/au0828-vbi.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/au0828/au0828-video.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-vbi.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-video.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/go7007/go7007-v4l2.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/hackrf/hackrf.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/msi2500/msi2500.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/pwc/pwc-if.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/s2255/s2255drv.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/stk1160/stk1160-v4l.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/usbtv/usbtv-video.c | 2 | ||||
-rw-r--r-- | drivers/media/usb/uvc/uvc_queue.c | 2 |
13 files changed, 13 insertions, 13 deletions
diff --git a/drivers/media/usb/airspy/airspy.c b/drivers/media/usb/airspy/airspy.c index 87c12930416f..d807d5875f7e 100644 --- a/drivers/media/usb/airspy/airspy.c +++ b/drivers/media/usb/airspy/airspy.c @@ -488,7 +488,7 @@ static void airspy_disconnect(struct usb_interface *intf) /* Videobuf2 operations */ static int airspy_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, - unsigned int *nplanes, unsigned int sizes[], void *alloc_ctxs[]) + unsigned int *nplanes, unsigned int sizes[], struct device *alloc_devs[]) { struct airspy *s = vb2_get_drv_priv(vq); diff --git a/drivers/media/usb/au0828/au0828-vbi.c b/drivers/media/usb/au0828/au0828-vbi.c index b4efc103ae57..e0930ce59b8d 100644 --- a/drivers/media/usb/au0828/au0828-vbi.c +++ b/drivers/media/usb/au0828/au0828-vbi.c @@ -32,7 +32,7 @@ static int vbi_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, unsigned int *nplanes, - unsigned int sizes[], void *alloc_ctxs[]) + unsigned int sizes[], struct device *alloc_devs[]) { struct au0828_dev *dev = vb2_get_drv_priv(vq); unsigned long size = dev->vbi_width * dev->vbi_height * 2; diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c index 7d0ec4cb248c..82b026985868 100644 --- a/drivers/media/usb/au0828/au0828-video.c +++ b/drivers/media/usb/au0828/au0828-video.c @@ -698,7 +698,7 @@ int au0828_v4l2_device_register(struct usb_interface *interface, static int queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, unsigned int *nplanes, - unsigned int sizes[], void *alloc_ctxs[]) + unsigned int sizes[], struct device *alloc_devs[]) { struct au0828_dev *dev = vb2_get_drv_priv(vq); unsigned long size = dev->height * dev->bytesperline; diff --git a/drivers/media/usb/em28xx/em28xx-vbi.c b/drivers/media/usb/em28xx/em28xx-vbi.c index fe94c9225dd7..836c6b53b16c 100644 --- a/drivers/media/usb/em28xx/em28xx-vbi.c +++ b/drivers/media/usb/em28xx/em28xx-vbi.c @@ -33,7 +33,7 @@ static int vbi_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, unsigned int *nplanes, - unsigned int sizes[], void *alloc_ctxs[]) + unsigned int sizes[], struct device *alloc_devs[]) { struct em28xx *dev = vb2_get_drv_priv(vq); struct em28xx_v4l2 *v4l2 = dev->v4l2; diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index 44834b2eff55..7968695217f3 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c @@ -1013,7 +1013,7 @@ static void em28xx_v4l2_create_entities(struct em28xx *dev) static int queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, unsigned int *nplanes, - unsigned int sizes[], void *alloc_ctxs[]) + unsigned int sizes[], struct device *alloc_devs[]) { struct em28xx *dev = vb2_get_drv_priv(vq); struct em28xx_v4l2 *v4l2 = dev->v4l2; diff --git a/drivers/media/usb/go7007/go7007-v4l2.c b/drivers/media/usb/go7007/go7007-v4l2.c index ea01ee5df60a..af8458996d91 100644 --- a/drivers/media/usb/go7007/go7007-v4l2.c +++ b/drivers/media/usb/go7007/go7007-v4l2.c @@ -370,7 +370,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, static int go7007_queue_setup(struct vb2_queue *q, unsigned int *num_buffers, unsigned int *num_planes, - unsigned int sizes[], void *alloc_ctxs[]) + unsigned int sizes[], struct device *alloc_devs[]) { sizes[0] = GO7007_BUF_SIZE; *num_planes = 1; diff --git a/drivers/media/usb/hackrf/hackrf.c b/drivers/media/usb/hackrf/hackrf.c index 9e700caf0d66..b1e229a44192 100644 --- a/drivers/media/usb/hackrf/hackrf.c +++ b/drivers/media/usb/hackrf/hackrf.c @@ -760,7 +760,7 @@ static void hackrf_return_all_buffers(struct vb2_queue *vq, static int hackrf_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, - unsigned int *nplanes, unsigned int sizes[], void *alloc_ctxs[]) + unsigned int *nplanes, unsigned int sizes[], struct device *alloc_devs[]) { struct hackrf_dev *dev = vb2_get_drv_priv(vq); diff --git a/drivers/media/usb/msi2500/msi2500.c b/drivers/media/usb/msi2500/msi2500.c index 2d33033682af..e7f167d44c61 100644 --- a/drivers/media/usb/msi2500/msi2500.c +++ b/drivers/media/usb/msi2500/msi2500.c @@ -618,7 +618,7 @@ static int msi2500_querycap(struct file *file, void *fh, static int msi2500_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, unsigned int *nplanes, unsigned int sizes[], - void *alloc_ctxs[]) + struct device *alloc_devs[]) { struct msi2500_dev *dev = vb2_get_drv_priv(vq); diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c index 18aed5dd325e..dd43652fdef8 100644 --- a/drivers/media/usb/pwc/pwc-if.c +++ b/drivers/media/usb/pwc/pwc-if.c @@ -573,7 +573,7 @@ static void pwc_video_release(struct v4l2_device *v) static int queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, unsigned int *nplanes, - unsigned int sizes[], void *alloc_ctxs[]) + unsigned int sizes[], struct device *alloc_devs[]) { struct pwc_device *pdev = vb2_get_drv_priv(vq); int size; diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c index 9acdaa3716fb..43ba71a7d02b 100644 --- a/drivers/media/usb/s2255/s2255drv.c +++ b/drivers/media/usb/s2255/s2255drv.c @@ -662,7 +662,7 @@ static void s2255_fillbuff(struct s2255_vc *vc, static int queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, unsigned int *nplanes, - unsigned int sizes[], void *alloc_ctxs[]) + unsigned int sizes[], struct device *alloc_devs[]) { struct s2255_vc *vc = vb2_get_drv_priv(vq); if (*nbuffers < S2255_MIN_BUFS) diff --git a/drivers/media/usb/stk1160/stk1160-v4l.c b/drivers/media/usb/stk1160/stk1160-v4l.c index 7ddbc0274f12..5fab3bee8c74 100644 --- a/drivers/media/usb/stk1160/stk1160-v4l.c +++ b/drivers/media/usb/stk1160/stk1160-v4l.c @@ -666,7 +666,7 @@ static const struct v4l2_ioctl_ops stk1160_ioctl_ops = { */ static int queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, unsigned int *nplanes, - unsigned int sizes[], void *alloc_ctxs[]) + unsigned int sizes[], struct device *alloc_devs[]) { struct stk1160 *dev = vb2_get_drv_priv(vq); unsigned long size; diff --git a/drivers/media/usb/usbtv/usbtv-video.c b/drivers/media/usb/usbtv/usbtv-video.c index f6cfad46547e..7e282048f932 100644 --- a/drivers/media/usb/usbtv/usbtv-video.c +++ b/drivers/media/usb/usbtv/usbtv-video.c @@ -608,7 +608,7 @@ static struct v4l2_file_operations usbtv_fops = { static int usbtv_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, - unsigned int *nplanes, unsigned int sizes[], void *alloc_ctxs[]) + unsigned int *nplanes, unsigned int sizes[], struct device *alloc_devs[]) { struct usbtv *usbtv = vb2_get_drv_priv(vq); unsigned size = USBTV_CHUNK * usbtv->n_chunks * 2 * sizeof(u32); diff --git a/drivers/media/usb/uvc/uvc_queue.c b/drivers/media/usb/uvc/uvc_queue.c index 54394722756f..773fefb52d7a 100644 --- a/drivers/media/usb/uvc/uvc_queue.c +++ b/drivers/media/usb/uvc/uvc_queue.c @@ -71,7 +71,7 @@ static void uvc_queue_return_buffers(struct uvc_video_queue *queue, static int uvc_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, unsigned int *nplanes, - unsigned int sizes[], void *alloc_ctxs[]) + unsigned int sizes[], struct device *alloc_devs[]) { struct uvc_video_queue *queue = vb2_get_drv_priv(vq); struct uvc_streaming *stream = uvc_queue_to_stream(queue); |