@@ -306,9 +306,7 @@ static int stk1160_probe(struct usb_interface *interface,
usb_set_intfdata(interface, dev);
/* initialize videobuf2 stuff */
- rc = stk1160_vb2_setup(dev);
- if (rc < 0)
- goto free_err;
+ stk1160_vb2_setup(dev);
/*
* There is no need to take any locks here in probe
@@ -670,12 +670,10 @@ void stk1160_clear_queue(struct stk1160 *dev)
spin_unlock_irqrestore(&dev->buf_lock, flags);
}
-int stk1160_vb2_setup(struct stk1160 *dev)
+void stk1160_vb2_setup(struct stk1160 *dev)
{
- int rc;
- struct vb2_queue *q;
+ struct vb2_queue *q = &dev->vb_vidq;
- q = &dev->vb_vidq;
q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
q->io_modes = VB2_READ | VB2_MMAP | VB2_USERPTR;
q->drv_priv = dev;
@@ -683,14 +681,10 @@ int stk1160_vb2_setup(struct stk1160 *dev)
q->ops = &stk1160_video_qops;
q->mem_ops = &vb2_vmalloc_memops;
- rc = vb2_queue_init(q);
- if (rc < 0)
- return rc;
+ vb2_queue_init(q);
/* initialize video dma queue */
INIT_LIST_HEAD(&dev->avail_bufs);
-
- return 0;
}
int stk1160_video_register(struct stk1160 *dev)
@@ -173,7 +173,7 @@ struct regval {
};
/* Provided by stk1160-v4l.c */
-int stk1160_vb2_setup(struct stk1160 *dev);
+void stk1160_vb2_setup(struct stk1160 *dev);
int stk1160_video_register(struct stk1160 *dev);
void stk1160_video_unregister(struct stk1160 *dev);
void stk1160_clear_queue(struct stk1160 *dev);
Right now vb2_queue_init() returns always 0 and it will be changed to return void. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> --- drivers/media/usb/stk1160/stk1160-core.c | 4 +--- drivers/media/usb/stk1160/stk1160-v4l.c | 12 +++--------- drivers/media/usb/stk1160/stk1160.h | 2 +- 3 files changed, 5 insertions(+), 13 deletions(-)