Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] gspca - main: Cleanup source

- change copyright and erroneous comment
- small code optimization
- have constant the device template

Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Jean-François Moine and committed by
Mauro Carvalho Chehab
59929cef 58c92d37

+7 -6
+7 -6
drivers/media/video/gspca/gspca.c
··· 1 1 /* 2 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 6 * Camera button input handling by Márton Németh 7 7 * Copyright (C) 2009-2010 Márton Németh <nm127@freemail.hu> ··· 414 414 * - 0 or many INTER_PACKETs 415 415 * - one LAST_PACKET 416 416 * DISCARD_PACKET invalidates the whole frame. 417 - * On LAST_PACKET, a new frame is returned. 418 417 */ 419 418 void gspca_frame_add(struct gspca_dev *gspca_dev, 420 419 enum gspca_packet_type packet_type, ··· 1524 1525 gspca_dev->usb_err = 0; 1525 1526 gspca_stream_off(gspca_dev); 1526 1527 mutex_unlock(&gspca_dev->usb_lock); 1528 + 1529 + /* Don't restart the stream when switching from read 1530 + * to mmap mode */ 1531 + if (gspca_dev->memory == GSPCA_MEMORY_READ) 1532 + streaming = 0; 1527 1533 } 1528 - /* Don't restart the stream when switching from read to mmap mode */ 1529 - if (gspca_dev->memory == GSPCA_MEMORY_READ) 1530 - streaming = 0; 1531 1534 1532 1535 /* free the previous allocated buffers, if any */ 1533 1536 if (gspca_dev->nframes != 0) ··· 2153 2152 .vidioc_g_chip_ident = vidioc_g_chip_ident, 2154 2153 }; 2155 2154 2156 - static struct video_device gspca_template = { 2155 + static const struct video_device gspca_template = { 2157 2156 .name = "gspca main driver", 2158 2157 .fops = &dev_fops, 2159 2158 .ioctl_ops = &dev_ioctl_ops,