aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2009-01-13 04:07:59 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:42:31 -0400
commit8d584a53ac82edc0bc01add620d94b3a2d4e9cce (patch)
tree3751acce6c09b8f1f9636dc8423fe9b7953507d9 /drivers/media/video
parent8c2ba44106a8693c7f5d2da93c3ab135254d86af (diff)
V4L/DVB (10357): gspca - main: Cleanup code.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/gspca/gspca.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index e13833b8ed67..5dd2abc17ae6 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -46,8 +46,6 @@ MODULE_LICENSE("GPL");
46 46
47#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 5, 0) 47#define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 5, 0)
48 48
49static int video_nr = -1;
50
51#ifdef GSPCA_DEBUG 49#ifdef GSPCA_DEBUG
52int gspca_debug = D_ERR | D_PROBE; 50int gspca_debug = D_ERR | D_PROBE;
53EXPORT_SYMBOL(gspca_debug); 51EXPORT_SYMBOL(gspca_debug);
@@ -126,7 +124,7 @@ static void fill_frame(struct gspca_dev *gspca_dev,
126 struct urb *urb) 124 struct urb *urb)
127{ 125{
128 struct gspca_frame *frame; 126 struct gspca_frame *frame;
129 __u8 *data; /* address of data in the iso message */ 127 u8 *data; /* address of data in the iso message */
130 int i, len, st; 128 int i, len, st;
131 cam_pkt_op pkt_scan; 129 cam_pkt_op pkt_scan;
132 130
@@ -166,7 +164,7 @@ static void fill_frame(struct gspca_dev *gspca_dev,
166 /* let the packet be analyzed by the subdriver */ 164 /* let the packet be analyzed by the subdriver */
167 PDEBUG(D_PACK, "packet [%d] o:%d l:%d", 165 PDEBUG(D_PACK, "packet [%d] o:%d l:%d",
168 i, urb->iso_frame_desc[i].offset, len); 166 i, urb->iso_frame_desc[i].offset, len);
169 data = (__u8 *) urb->transfer_buffer 167 data = (u8 *) urb->transfer_buffer
170 + urb->iso_frame_desc[i].offset; 168 + urb->iso_frame_desc[i].offset;
171 pkt_scan(gspca_dev, frame, data, len); 169 pkt_scan(gspca_dev, frame, data, len);
172 } 170 }
@@ -182,8 +180,7 @@ static void fill_frame(struct gspca_dev *gspca_dev,
182 * 180 *
183 * Analyse each packet and call the subdriver for copy to the frame buffer. 181 * Analyse each packet and call the subdriver for copy to the frame buffer.
184 */ 182 */
185static void isoc_irq(struct urb *urb 183static void isoc_irq(struct urb *urb)
186)
187{ 184{
188 struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context; 185 struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context;
189 186
@@ -196,8 +193,7 @@ static void isoc_irq(struct urb *urb
196/* 193/*
197 * bulk message interrupt from the USB device 194 * bulk message interrupt from the USB device
198 */ 195 */
199static void bulk_irq(struct urb *urb 196static void bulk_irq(struct urb *urb)
200)
201{ 197{
202 struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context; 198 struct gspca_dev *gspca_dev = (struct gspca_dev *) urb->context;
203 struct gspca_frame *frame; 199 struct gspca_frame *frame;
@@ -1916,7 +1912,7 @@ int gspca_dev_probe(struct usb_interface *intf,
1916 gspca_dev->present = 1; 1912 gspca_dev->present = 1;
1917 ret = video_register_device(&gspca_dev->vdev, 1913 ret = video_register_device(&gspca_dev->vdev,
1918 VFL_TYPE_GRABBER, 1914 VFL_TYPE_GRABBER,
1919 video_nr); 1915 -1);
1920 if (ret < 0) { 1916 if (ret < 0) {
1921 err("video_register_device err %d", ret); 1917 err("video_register_device err %d", ret);
1922 goto out; 1918 goto out;