aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/gspca.c
diff options
context:
space:
mode:
authorHans de Goede <j.w.r.degoede@hhs.nl>2008-04-23 07:09:12 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 06:14:32 -0400
commite2997a72ddfafc25bd0c8f1f52bcf41979d5a559 (patch)
treebe39e1c2f946a5d3c2e82fe7a2d663f54fda11d4 /drivers/media/video/gspca/gspca.c
parent63eb9546dcb5e9dc39ab88a603dede8fdd18e717 (diff)
V4L/DVB (8153): Subdriver pac207 added and minor changes.
pac207 added. Check status on mutex lock. Call back on frame dequeue. Free the resources on last close only. Avoid URB and ISOC errors on close. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/gspca/gspca.c')
-rw-r--r--drivers/media/video/gspca/gspca.c121
1 files changed, 69 insertions, 52 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 4fe082ff7074..c4735e133611 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -39,8 +39,8 @@ MODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>");
39MODULE_DESCRIPTION("GSPCA USB Camera Driver"); 39MODULE_DESCRIPTION("GSPCA USB Camera Driver");
40MODULE_LICENSE("GPL"); 40MODULE_LICENSE("GPL");
41 41
42#define DRIVER_VERSION_NUMBER KERNEL_VERSION(0, 0, 26) 42#define DRIVER_VERSION_NUMBER KERNEL_VERSION(0, 0, 30)
43static const char version[] = "0.0.26"; 43static const char version[] = "0.0.30";
44 44
45static int video_nr = -1; 45static int video_nr = -1;
46 46
@@ -172,8 +172,7 @@ struct gspca_frame *gspca_frame_add(struct gspca_dev *gspca_dev,
172{ 172{
173 int i, j; 173 int i, j;
174 174
175 PDEBUG(D_PACK, "add t:%d l:%d %02x %02x %02x %02x...", 175 PDEBUG(D_PACK, "add t:%d l:%d", packet_type, len);
176 packet_type, len, data[0], data[1], data[2], data[3]);
177 176
178 /* when start of a new frame, if the current frame buffer 177 /* when start of a new frame, if the current frame buffer
179 * is not queued, discard the whole frame */ 178 * is not queued, discard the whole frame */
@@ -346,7 +345,6 @@ static int gspca_kill_transfer(struct gspca_dev *gspca_dev)
346 unsigned int i; 345 unsigned int i;
347 346
348 PDEBUG(D_STREAM, "kill transfer"); 347 PDEBUG(D_STREAM, "kill transfer");
349 gspca_dev->streaming = 0;
350 for (i = 0; i < NURBS; ++i) { 348 for (i = 0; i < NURBS; ++i) {
351 urb = gspca_dev->pktbuf[i].urb; 349 urb = gspca_dev->pktbuf[i].urb;
352 if (urb == NULL) 350 if (urb == NULL)
@@ -501,9 +499,8 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev)
501 struct usb_host_endpoint *ep; 499 struct usb_host_endpoint *ep;
502 int n, ret; 500 int n, ret;
503 501
504 ret = mutex_lock_interruptible(&gspca_dev->usb_lock); 502 if (mutex_lock_interruptible(&gspca_dev->usb_lock))
505 if (ret < 0) 503 return -ERESTARTSYS;
506 return ret;
507 504
508 /* set the max alternate setting and loop until urb submit succeeds */ 505 /* set the max alternate setting and loop until urb submit succeeds */
509 intf = usb_ifnum_to_if(gspca_dev->dev, gspca_dev->iface); 506 intf = usb_ifnum_to_if(gspca_dev->dev, gspca_dev->iface);
@@ -531,6 +528,7 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev)
531 if (ret < 0) { 528 if (ret < 0) {
532 PDEBUG(D_ERR|D_STREAM, 529 PDEBUG(D_ERR|D_STREAM,
533 "usb_submit_urb [%d] err %d", n, ret); 530 "usb_submit_urb [%d] err %d", n, ret);
531 gspca_dev->streaming = 0;
534 gspca_kill_transfer(gspca_dev); 532 gspca_kill_transfer(gspca_dev);
535 if (ret == -ENOSPC) 533 if (ret == -ENOSPC)
536 break; /* try the previous alt */ 534 break; /* try the previous alt */
@@ -555,9 +553,9 @@ static int gspca_set_alt0(struct gspca_dev *gspca_dev)
555 return ret; 553 return ret;
556} 554}
557 555
556/* Note both the queue and the usb lock should be hold when calling this */
558static void gspca_stream_off(struct gspca_dev *gspca_dev) 557static void gspca_stream_off(struct gspca_dev *gspca_dev)
559{ 558{
560 mutex_lock_interruptible(&gspca_dev->usb_lock);
561 gspca_dev->streaming = 0; 559 gspca_dev->streaming = 0;
562 if (gspca_dev->present) { 560 if (gspca_dev->present) {
563 gspca_dev->sd_desc->stopN(gspca_dev); 561 gspca_dev->sd_desc->stopN(gspca_dev);
@@ -571,7 +569,6 @@ static void gspca_stream_off(struct gspca_dev *gspca_dev)
571 wake_up_interruptible(&gspca_dev->wq); 569 wake_up_interruptible(&gspca_dev->wq);
572 PDEBUG(D_ERR|D_STREAM, "stream off no device ??"); 570 PDEBUG(D_ERR|D_STREAM, "stream off no device ??");
573 } 571 }
574 mutex_unlock(&gspca_dev->usb_lock);
575} 572}
576 573
577static int gspca_set_default_mode(struct gspca_dev *gspca_dev) 574static int gspca_set_default_mode(struct gspca_dev *gspca_dev)
@@ -791,9 +788,7 @@ static int vidioc_try_fmt_cap(struct file *file,
791{ 788{
792 int ret; 789 int ret;
793 790
794/* mutex_lock_interruptible(&gspca_dev->queue_lock); */
795 ret = try_fmt_cap(file, priv, fmt); 791 ret = try_fmt_cap(file, priv, fmt);
796/* mutex_unlock(&gspca_dev->queue_lock); */
797 if (ret < 0) 792 if (ret < 0)
798 return ret; 793 return ret;
799 return 0; 794 return 0;
@@ -812,7 +807,8 @@ static int vidioc_s_fmt_cap(struct file *file, void *priv,
812 fmt->fmt.pix.width, fmt->fmt.pix.height); 807 fmt->fmt.pix.width, fmt->fmt.pix.height);
813 } 808 }
814#endif 809#endif
815 mutex_lock_interruptible(&gspca_dev->queue_lock); 810 if (mutex_lock_interruptible(&gspca_dev->queue_lock))
811 return -ERESTARTSYS;
816 ret = try_fmt_cap(file, priv, fmt); 812 ret = try_fmt_cap(file, priv, fmt);
817 if (ret < 0) 813 if (ret < 0)
818 goto out; 814 goto out;
@@ -820,8 +816,14 @@ static int vidioc_s_fmt_cap(struct file *file, void *priv,
820 if (ret == gspca_dev->curr_mode) 816 if (ret == gspca_dev->curr_mode)
821 goto out; /* same mode */ 817 goto out; /* same mode */
822 was_streaming = gspca_dev->streaming; 818 was_streaming = gspca_dev->streaming;
823 if (was_streaming != 0) 819 if (was_streaming != 0) {
820 if (mutex_lock_interruptible(&gspca_dev->usb_lock)) {
821 ret = -ERESTARTSYS;
822 goto out;
823 }
824 gspca_stream_off(gspca_dev); 824 gspca_stream_off(gspca_dev);
825 mutex_unlock(&gspca_dev->usb_lock);
826 }
825 gspca_dev->width = (int) fmt->fmt.pix.width; 827 gspca_dev->width = (int) fmt->fmt.pix.width;
826 gspca_dev->height = (int) fmt->fmt.pix.height; 828 gspca_dev->height = (int) fmt->fmt.pix.height;
827 gspca_dev->pixfmt = fmt->fmt.pix.pixelformat; 829 gspca_dev->pixfmt = fmt->fmt.pix.pixelformat;
@@ -840,9 +842,8 @@ static int dev_open(struct inode *inode, struct file *file)
840 842
841 PDEBUG(D_STREAM, "opening"); 843 PDEBUG(D_STREAM, "opening");
842 gspca_dev = (struct gspca_dev *) video_devdata(file); 844 gspca_dev = (struct gspca_dev *) video_devdata(file);
843 ret = mutex_lock_interruptible(&gspca_dev->queue_lock); 845 if (mutex_lock_interruptible(&gspca_dev->queue_lock))
844 if (ret < 0) 846 return -ERESTARTSYS;
845 return ret;
846 if (!gspca_dev->present) { 847 if (!gspca_dev->present) {
847 ret = -ENODEV; 848 ret = -ENODEV;
848 goto out; 849 goto out;
@@ -850,16 +851,17 @@ static int dev_open(struct inode *inode, struct file *file)
850 851
851 /* if not done yet, initialize the sensor */ 852 /* if not done yet, initialize the sensor */
852 if (gspca_dev->users == 0) { 853 if (gspca_dev->users == 0) {
853 ret = mutex_lock_interruptible(&gspca_dev->usb_lock); 854 if (mutex_lock_interruptible(&gspca_dev->usb_lock)) {
854 if (ret < 0) 855 ret = -ERESTARTSYS;
855 goto out; 856 goto out;
857 }
856 ret = gspca_dev->sd_desc->open(gspca_dev); 858 ret = gspca_dev->sd_desc->open(gspca_dev);
857 mutex_unlock(&gspca_dev->usb_lock); 859 mutex_unlock(&gspca_dev->usb_lock);
858 if (ret != 0) { 860 if (ret != 0) {
859 PDEBUG(D_ERR|D_CONF, "init device failed %d", ret); 861 PDEBUG(D_ERR|D_CONF, "init device failed %d", ret);
860 goto out; 862 goto out;
861 } 863 }
862 } else if (gspca_dev->users > 8) { /* (arbitrary value) */ 864 } else if (gspca_dev->users > 4) { /* (arbitrary value) */
863 ret = -EBUSY; 865 ret = -EBUSY;
864 goto out; 866 goto out;
865 } 867 }
@@ -886,21 +888,20 @@ static int dev_close(struct inode *inode, struct file *file)
886 struct gspca_dev *gspca_dev = file->private_data; 888 struct gspca_dev *gspca_dev = file->private_data;
887 889
888 PDEBUG(D_STREAM, "closing"); 890 PDEBUG(D_STREAM, "closing");
889 if (gspca_dev->streaming) { 891 if (mutex_lock_interruptible(&gspca_dev->queue_lock))
890 mutex_lock_interruptible(&gspca_dev->queue_lock); 892 return -ERESTARTSYS;
891 gspca_stream_off(gspca_dev); 893 gspca_dev->users--;
894 if (gspca_dev->users > 0) {
892 mutex_unlock(&gspca_dev->queue_lock); 895 mutex_unlock(&gspca_dev->queue_lock);
896 return 0;
893 } 897 }
894 mutex_lock_interruptible(&gspca_dev->usb_lock); 898
899 if (gspca_dev->streaming)
900 gspca_stream_off(gspca_dev);
895 gspca_dev->sd_desc->close(gspca_dev); 901 gspca_dev->sd_desc->close(gspca_dev);
896 mutex_unlock(&gspca_dev->usb_lock); 902
897 atomic_inc(&gspca_dev->nevent);
898 wake_up_interruptible(&gspca_dev->wq); /* wake blocked processes */
899 schedule();
900 mutex_lock_interruptible(&gspca_dev->queue_lock);
901 frame_free(gspca_dev); 903 frame_free(gspca_dev);
902 file->private_data = NULL; 904 file->private_data = NULL;
903 gspca_dev->users--;
904 mutex_unlock(&gspca_dev->queue_lock); 905 mutex_unlock(&gspca_dev->queue_lock);
905 PDEBUG(D_STREAM, "closed"); 906 PDEBUG(D_STREAM, "closed");
906 return 0; 907 return 0;
@@ -964,7 +965,8 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
964 && ctrl->value > ctrls->qctrl.maximum) 965 && ctrl->value > ctrls->qctrl.maximum)
965 return -ERANGE; 966 return -ERANGE;
966 PDEBUG(D_CONF, "set ctrl [%08x] = %d", ctrl->id, ctrl->value); 967 PDEBUG(D_CONF, "set ctrl [%08x] = %d", ctrl->id, ctrl->value);
967 mutex_lock_interruptible(&gspca_dev->usb_lock); 968 if (mutex_lock_interruptible(&gspca_dev->usb_lock))
969 return -ERESTARTSYS;
968 ret = ctrls->set(gspca_dev, ctrl->value); 970 ret = ctrls->set(gspca_dev, ctrl->value);
969 mutex_unlock(&gspca_dev->usb_lock); 971 mutex_unlock(&gspca_dev->usb_lock);
970 return ret; 972 return ret;
@@ -985,7 +987,8 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
985 i++, ctrls++) { 987 i++, ctrls++) {
986 if (ctrl->id != ctrls->qctrl.id) 988 if (ctrl->id != ctrls->qctrl.id)
987 continue; 989 continue;
988 mutex_lock_interruptible(&gspca_dev->usb_lock); 990 if (mutex_lock_interruptible(&gspca_dev->usb_lock))
991 return -ERESTARTSYS;
989 ret = ctrls->get(gspca_dev, &ctrl->value); 992 ret = ctrls->get(gspca_dev, &ctrl->value);
990 mutex_unlock(&gspca_dev->usb_lock); 993 mutex_unlock(&gspca_dev->usb_lock);
991 return ret; 994 return ret;
@@ -1047,9 +1050,8 @@ static int vidioc_reqbufs(struct file *file, void *priv,
1047 frsz = gspca_get_buff_size(gspca_dev); 1050 frsz = gspca_get_buff_size(gspca_dev);
1048 if (frsz < 0) 1051 if (frsz < 0)
1049 return frsz; 1052 return frsz;
1050 ret = mutex_lock_interruptible(&gspca_dev->queue_lock); 1053 if (mutex_lock_interruptible(&gspca_dev->queue_lock))
1051 if (ret < 0) 1054 return -ERESTARTSYS;
1052 return ret;
1053 ret = frame_alloc(gspca_dev, 1055 ret = frame_alloc(gspca_dev,
1054 rb->count, 1056 rb->count,
1055 (unsigned int) frsz, 1057 (unsigned int) frsz,
@@ -1087,9 +1089,8 @@ static int vidioc_streamon(struct file *file, void *priv,
1087 PDEBUG(D_STREAM, "stream on"); 1089 PDEBUG(D_STREAM, "stream on");
1088 if (buf_type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 1090 if (buf_type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
1089 return -EINVAL; 1091 return -EINVAL;
1090 ret = mutex_lock_interruptible(&gspca_dev->queue_lock); 1092 if (mutex_lock_interruptible(&gspca_dev->queue_lock))
1091 if (ret < 0) 1093 return -ERESTARTSYS;
1092 return ret;
1093 if (!gspca_dev->present) { 1094 if (!gspca_dev->present) {
1094 ret = -ENODEV; 1095 ret = -ENODEV;
1095 goto out; 1096 goto out;
@@ -1111,6 +1112,7 @@ static int vidioc_streamon(struct file *file, void *priv,
1111 gspca_dev->height); 1112 gspca_dev->height);
1112 } 1113 }
1113#endif 1114#endif
1115 ret = 0;
1114out: 1116out:
1115 mutex_unlock(&gspca_dev->queue_lock); 1117 mutex_unlock(&gspca_dev->queue_lock);
1116 return ret; 1118 return ret;
@@ -1125,8 +1127,14 @@ static int vidioc_streamoff(struct file *file, void *priv,
1125 if (buf_type != V4L2_BUF_TYPE_VIDEO_CAPTURE) 1127 if (buf_type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
1126 return -EINVAL; 1128 return -EINVAL;
1127 if (gspca_dev->streaming) { 1129 if (gspca_dev->streaming) {
1128 mutex_lock_interruptible(&gspca_dev->queue_lock); 1130 if (mutex_lock_interruptible(&gspca_dev->queue_lock))
1131 return -ERESTARTSYS;
1132 if (mutex_lock_interruptible(&gspca_dev->usb_lock)) {
1133 mutex_unlock(&gspca_dev->queue_lock);
1134 return -ERESTARTSYS;
1135 }
1129 gspca_stream_off(gspca_dev); 1136 gspca_stream_off(gspca_dev);
1137 mutex_unlock(&gspca_dev->usb_lock);
1130 mutex_unlock(&gspca_dev->queue_lock); 1138 mutex_unlock(&gspca_dev->queue_lock);
1131 } 1139 }
1132 return 0; 1140 return 0;
@@ -1140,7 +1148,8 @@ static int vidioc_g_jpegcomp(struct file *file, void *priv,
1140 1148
1141 if (!gspca_dev->sd_desc->get_jcomp) 1149 if (!gspca_dev->sd_desc->get_jcomp)
1142 return -EINVAL; 1150 return -EINVAL;
1143 mutex_lock_interruptible(&gspca_dev->usb_lock); 1151 if (mutex_lock_interruptible(&gspca_dev->usb_lock))
1152 return -ERESTARTSYS;
1144 ret = gspca_dev->sd_desc->get_jcomp(gspca_dev, jpegcomp); 1153 ret = gspca_dev->sd_desc->get_jcomp(gspca_dev, jpegcomp);
1145 mutex_unlock(&gspca_dev->usb_lock); 1154 mutex_unlock(&gspca_dev->usb_lock);
1146 return ret; 1155 return ret;
@@ -1152,7 +1161,8 @@ static int vidioc_s_jpegcomp(struct file *file, void *priv,
1152 struct gspca_dev *gspca_dev = priv; 1161 struct gspca_dev *gspca_dev = priv;
1153 int ret; 1162 int ret;
1154 1163
1155 mutex_lock_interruptible(&gspca_dev->usb_lock); 1164 if (mutex_lock_interruptible(&gspca_dev->usb_lock))
1165 return -ERESTARTSYS;
1156 if (!gspca_dev->sd_desc->set_jcomp) 1166 if (!gspca_dev->sd_desc->set_jcomp)
1157 return -EINVAL; 1167 return -EINVAL;
1158 ret = gspca_dev->sd_desc->set_jcomp(gspca_dev, jpegcomp); 1168 ret = gspca_dev->sd_desc->set_jcomp(gspca_dev, jpegcomp);
@@ -1177,7 +1187,8 @@ static int vidioc_s_parm(struct file *filp, void *priv,
1177 struct gspca_dev *gspca_dev = priv; 1187 struct gspca_dev *gspca_dev = priv;
1178 int n; 1188 int n;
1179 1189
1180 mutex_lock_interruptible(&gspca_dev->usb_lock); 1190 if (mutex_lock_interruptible(&gspca_dev->usb_lock))
1191 return -ERESTARTSYS;
1181 n = parm->parm.capture.readbuffers; 1192 n = parm->parm.capture.readbuffers;
1182 if (n == 0 || n > GSPCA_MAX_FRAMES) 1193 if (n == 0 || n > GSPCA_MAX_FRAMES)
1183 parm->parm.capture.readbuffers = gspca_dev->nbufread; 1194 parm->parm.capture.readbuffers = gspca_dev->nbufread;
@@ -1230,10 +1241,8 @@ static int dev_mmap(struct file *file, struct vm_area_struct *vma)
1230 size = vma->vm_end - vma->vm_start; 1241 size = vma->vm_end - vma->vm_start;
1231 PDEBUG(D_STREAM, "mmap start:%08x size:%d", (int) start, (int) size); 1242 PDEBUG(D_STREAM, "mmap start:%08x size:%d", (int) start, (int) size);
1232 1243
1233 ret = mutex_lock_interruptible(&gspca_dev->queue_lock); 1244 if (mutex_lock_interruptible(&gspca_dev->queue_lock))
1234 if (ret < 0) 1245 return -ERESTARTSYS;
1235 return ret;
1236/* sanity check disconnect, in use, no memory available */
1237 if (!gspca_dev->present) { 1246 if (!gspca_dev->present) {
1238 ret = -ENODEV; 1247 ret = -ENODEV;
1239 goto done; 1248 goto done;
@@ -1294,6 +1303,7 @@ static int dev_mmap(struct file *file, struct vm_area_struct *vma)
1294 V4L2_BUF_FLAG_MAPPED; 1303 V4L2_BUF_FLAG_MAPPED;
1295 } 1304 }
1296#endif 1305#endif
1306 ret = 0;
1297done: 1307done:
1298 mutex_unlock(&gspca_dev->queue_lock); 1308 mutex_unlock(&gspca_dev->queue_lock);
1299 return ret; 1309 return ret;
@@ -1350,6 +1360,8 @@ static int gspca_frame_wait(struct gspca_dev *gspca_dev,
1350 atomic_read(&gspca_dev->nevent) > 0); 1360 atomic_read(&gspca_dev->nevent) > 0);
1351 if (ret != 0) 1361 if (ret != 0)
1352 return ret; 1362 return ret;
1363 if (!gspca_dev->streaming || !gspca_dev->present)
1364 return -EIO;
1353 i = gspca_dev->fr_o; 1365 i = gspca_dev->fr_o;
1354 j = gspca_dev->fr_queue[i]; 1366 j = gspca_dev->fr_queue[i];
1355 frame = &gspca_dev->frame[j]; 1367 frame = &gspca_dev->frame[j];
@@ -1364,6 +1376,10 @@ ok:
1364 gspca_dev->fr_q, 1376 gspca_dev->fr_q,
1365 gspca_dev->fr_i, 1377 gspca_dev->fr_i,
1366 gspca_dev->fr_o); 1378 gspca_dev->fr_o);
1379
1380 if (gspca_dev->sd_desc->dq_callback)
1381 gspca_dev->sd_desc->dq_callback(gspca_dev);
1382
1367 return j; 1383 return j;
1368} 1384}
1369 1385
@@ -1435,9 +1451,9 @@ static int vidioc_qbuf(struct file *file, void *priv,
1435 return -EINVAL; 1451 return -EINVAL;
1436 } 1452 }
1437 1453
1438 ret = mutex_lock_interruptible(&gspca_dev->queue_lock); 1454 if (mutex_lock_interruptible(&gspca_dev->queue_lock))
1439 if (ret < 0) 1455 return -ERESTARTSYS;
1440 return ret; 1456
1441 if (frame->v4l2_buf.flags 1457 if (frame->v4l2_buf.flags
1442 & (V4L2_BUF_FLAG_QUEUED | V4L2_BUF_FLAG_DONE)) { 1458 & (V4L2_BUF_FLAG_QUEUED | V4L2_BUF_FLAG_DONE)) {
1443 PDEBUG(D_STREAM, "qbuf bad state"); 1459 PDEBUG(D_STREAM, "qbuf bad state");
@@ -1708,11 +1724,12 @@ void gspca_disconnect(struct usb_interface *intf)
1708 if (!gspca_dev) 1724 if (!gspca_dev)
1709 return; 1725 return;
1710 gspca_dev->present = 0; 1726 gspca_dev->present = 0;
1711 mutex_lock_interruptible(&gspca_dev->queue_lock); 1727 mutex_lock(&gspca_dev->queue_lock);
1712 mutex_lock_interruptible(&gspca_dev->usb_lock); 1728 mutex_lock(&gspca_dev->usb_lock);
1729 gspca_dev->streaming = 0;
1713 gspca_kill_transfer(gspca_dev); 1730 gspca_kill_transfer(gspca_dev);
1714 mutex_unlock(&gspca_dev->queue_lock);
1715 mutex_unlock(&gspca_dev->usb_lock); 1731 mutex_unlock(&gspca_dev->usb_lock);
1732 mutex_unlock(&gspca_dev->queue_lock);
1716 while (gspca_dev->users != 0) { /* wait until fully closed */ 1733 while (gspca_dev->users != 0) { /* wait until fully closed */
1717 atomic_inc(&gspca_dev->nevent); 1734 atomic_inc(&gspca_dev->nevent);
1718 wake_up_interruptible(&gspca_dev->wq); /* wake processes */ 1735 wake_up_interruptible(&gspca_dev->wq); /* wake processes */