aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/gspca/gspca.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index f21f2a258ae0..62881740a0bd 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Main USB camera driver 2 * Main USB camera driver
3 * 3 *
4 * Copyright (C) 2008-2010 Jean-François Moine <http://moinejf.free.fr> 4 * Copyright (C) 2008-2011 Jean-François Moine <http://moinejf.free.fr>
5 * 5 *
6 * Camera button input handling by Márton Németh 6 * Camera button input handling by Márton Németh
7 * Copyright (C) 2009-2010 Márton Németh <nm127@freemail.hu> 7 * Copyright (C) 2009-2010 Márton Németh <nm127@freemail.hu>
@@ -414,7 +414,6 @@ resubmit:
414 * - 0 or many INTER_PACKETs 414 * - 0 or many INTER_PACKETs
415 * - one LAST_PACKET 415 * - one LAST_PACKET
416 * DISCARD_PACKET invalidates the whole frame. 416 * DISCARD_PACKET invalidates the whole frame.
417 * On LAST_PACKET, a new frame is returned.
418 */ 417 */
419void gspca_frame_add(struct gspca_dev *gspca_dev, 418void gspca_frame_add(struct gspca_dev *gspca_dev,
420 enum gspca_packet_type packet_type, 419 enum gspca_packet_type packet_type,
@@ -1525,10 +1524,12 @@ static int vidioc_reqbufs(struct file *file, void *priv,
1525 gspca_dev->usb_err = 0; 1524 gspca_dev->usb_err = 0;
1526 gspca_stream_off(gspca_dev); 1525 gspca_stream_off(gspca_dev);
1527 mutex_unlock(&gspca_dev->usb_lock); 1526 mutex_unlock(&gspca_dev->usb_lock);
1527
1528 /* Don't restart the stream when switching from read
1529 * to mmap mode */
1530 if (gspca_dev->memory == GSPCA_MEMORY_READ)
1531 streaming = 0;
1528 } 1532 }
1529 /* Don't restart the stream when switching from read to mmap mode */
1530 if (gspca_dev->memory == GSPCA_MEMORY_READ)
1531 streaming = 0;
1532 1533
1533 /* free the previous allocated buffers, if any */ 1534 /* free the previous allocated buffers, if any */
1534 if (gspca_dev->nframes != 0) 1535 if (gspca_dev->nframes != 0)
@@ -2152,7 +2153,7 @@ static const struct v4l2_ioctl_ops dev_ioctl_ops = {
2152 .vidioc_g_chip_ident = vidioc_g_chip_ident, 2153 .vidioc_g_chip_ident = vidioc_g_chip_ident,
2153}; 2154};
2154 2155
2155static struct video_device gspca_template = { 2156static const struct video_device gspca_template = {
2156 .name = "gspca main driver", 2157 .name = "gspca main driver",
2157 .fops = &dev_fops, 2158 .fops = &dev_fops,
2158 .ioctl_ops = &dev_ioctl_ops, 2159 .ioctl_ops = &dev_ioctl_ops,