aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/gspca/finepix.c20
-rw-r--r--drivers/media/video/gspca/jl2005bcd.c6
-rw-r--r--drivers/media/video/gspca/sq905.c6
-rw-r--r--drivers/media/video/gspca/sq905c.c6
-rw-r--r--drivers/media/video/gspca/vicam.c6
-rw-r--r--drivers/media/video/gspca/zc3xx.c7
6 files changed, 40 insertions, 11 deletions
diff --git a/drivers/media/video/gspca/finepix.c b/drivers/media/video/gspca/finepix.c
index d0befe981098..6e26c93b4656 100644
--- a/drivers/media/video/gspca/finepix.c
+++ b/drivers/media/video/gspca/finepix.c
@@ -94,7 +94,11 @@ static void dostream(struct work_struct *work)
94 94
95 /* loop reading a frame */ 95 /* loop reading a frame */
96again: 96again:
97 while (!gspca_dev->frozen && gspca_dev->dev && gspca_dev->streaming) { 97 while (gspca_dev->dev && gspca_dev->streaming) {
98#ifdef CONFIG_PM
99 if (gspca_dev->frozen)
100 break;
101#endif
98 102
99 /* request a frame */ 103 /* request a frame */
100 mutex_lock(&gspca_dev->usb_lock); 104 mutex_lock(&gspca_dev->usb_lock);
@@ -102,8 +106,11 @@ again:
102 mutex_unlock(&gspca_dev->usb_lock); 106 mutex_unlock(&gspca_dev->usb_lock);
103 if (ret < 0) 107 if (ret < 0)
104 break; 108 break;
105 if (gspca_dev->frozen || !gspca_dev->dev || 109#ifdef CONFIG_PM
106 !gspca_dev->streaming) 110 if (gspca_dev->frozen)
111 break;
112#endif
113 if (!gspca_dev->dev || !gspca_dev->streaming)
107 break; 114 break;
108 115
109 /* the frame comes in parts */ 116 /* the frame comes in parts */
@@ -118,8 +125,11 @@ again:
118 * error. Just restart. */ 125 * error. Just restart. */
119 goto again; 126 goto again;
120 } 127 }
121 if (gspca_dev->frozen || !gspca_dev->dev || 128#ifdef CONFIG_PM
122 !gspca_dev->streaming) 129 if (gspca_dev->frozen)
130 goto out;
131#endif
132 if (!gspca_dev->dev || !gspca_dev->streaming)
123 goto out; 133 goto out;
124 if (len < FPIX_MAX_TRANSFER || 134 if (len < FPIX_MAX_TRANSFER ||
125 (data[len - 2] == 0xff && 135 (data[len - 2] == 0xff &&
diff --git a/drivers/media/video/gspca/jl2005bcd.c b/drivers/media/video/gspca/jl2005bcd.c
index e1fc2561e4bc..9c591c7c6f54 100644
--- a/drivers/media/video/gspca/jl2005bcd.c
+++ b/drivers/media/video/gspca/jl2005bcd.c
@@ -335,7 +335,11 @@ static void jl2005c_dostream(struct work_struct *work)
335 goto quit_stream; 335 goto quit_stream;
336 } 336 }
337 337
338 while (!gspca_dev->frozen && gspca_dev->dev && gspca_dev->streaming) { 338 while (gspca_dev->dev && gspca_dev->streaming) {
339#ifdef CONFIG_PM
340 if (gspca_dev->frozen)
341 break;
342#endif
339 /* Check if this is a new frame. If so, start the frame first */ 343 /* Check if this is a new frame. If so, start the frame first */
340 if (!header_read) { 344 if (!header_read) {
341 mutex_lock(&gspca_dev->usb_lock); 345 mutex_lock(&gspca_dev->usb_lock);
diff --git a/drivers/media/video/gspca/sq905.c b/drivers/media/video/gspca/sq905.c
index a144ce759b66..04f54654a026 100644
--- a/drivers/media/video/gspca/sq905.c
+++ b/drivers/media/video/gspca/sq905.c
@@ -232,7 +232,11 @@ static void sq905_dostream(struct work_struct *work)
232 frame_sz = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].sizeimage 232 frame_sz = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].sizeimage
233 + FRAME_HEADER_LEN; 233 + FRAME_HEADER_LEN;
234 234
235 while (!gspca_dev->frozen && gspca_dev->dev && gspca_dev->streaming) { 235 while (gspca_dev->dev && gspca_dev->streaming) {
236#ifdef CONFIG_PM
237 if (gspca_dev->frozen)
238 break;
239#endif
236 /* request some data and then read it until we have 240 /* request some data and then read it until we have
237 * a complete frame. */ 241 * a complete frame. */
238 bytes_left = frame_sz; 242 bytes_left = frame_sz;
diff --git a/drivers/media/video/gspca/sq905c.c b/drivers/media/video/gspca/sq905c.c
index 720c187f6ec7..f34ddb0570c8 100644
--- a/drivers/media/video/gspca/sq905c.c
+++ b/drivers/media/video/gspca/sq905c.c
@@ -150,7 +150,11 @@ static void sq905c_dostream(struct work_struct *work)
150 goto quit_stream; 150 goto quit_stream;
151 } 151 }
152 152
153 while (!gspca_dev->frozen && gspca_dev->dev && gspca_dev->streaming) { 153 while (gspca_dev->dev && gspca_dev->streaming) {
154#ifdef CONFIG_PM
155 if (gspca_dev->frozen)
156 break;
157#endif
154 /* Request the header, which tells the size to download */ 158 /* Request the header, which tells the size to download */
155 ret = usb_bulk_msg(gspca_dev->dev, 159 ret = usb_bulk_msg(gspca_dev->dev,
156 usb_rcvbulkpipe(gspca_dev->dev, 0x81), 160 usb_rcvbulkpipe(gspca_dev->dev, 0x81),
diff --git a/drivers/media/video/gspca/vicam.c b/drivers/media/video/gspca/vicam.c
index 432d6cd99cd6..15a30f7a4b2a 100644
--- a/drivers/media/video/gspca/vicam.c
+++ b/drivers/media/video/gspca/vicam.c
@@ -225,7 +225,11 @@ static void vicam_dostream(struct work_struct *work)
225 goto exit; 225 goto exit;
226 } 226 }
227 227
228 while (!gspca_dev->frozen && gspca_dev->dev && gspca_dev->streaming) { 228 while (gspca_dev->dev && gspca_dev->streaming) {
229#ifdef CONFIG_PM
230 if (gspca_dev->frozen)
231 break;
232#endif
229 ret = vicam_read_frame(gspca_dev, buffer, frame_sz); 233 ret = vicam_read_frame(gspca_dev, buffer, frame_sz);
230 if (ret < 0) 234 if (ret < 0)
231 break; 235 break;
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c
index 0d504a7c512c..f0bacee33ef9 100644
--- a/drivers/media/video/gspca/zc3xx.c
+++ b/drivers/media/video/gspca/zc3xx.c
@@ -5946,8 +5946,11 @@ static void transfer_update(struct work_struct *work)
5946 msleep(100); 5946 msleep(100);
5947 5947
5948 mutex_lock(&gspca_dev->usb_lock); 5948 mutex_lock(&gspca_dev->usb_lock);
5949 if (gspca_dev->frozen || !gspca_dev->dev || 5949#ifdef CONFIG_PM
5950 !gspca_dev->streaming) 5950 if (gspca_dev->frozen)
5951 goto err;
5952#endif
5953 if (!gspca_dev->dev || !gspca_dev->streaming)
5951 goto err; 5954 goto err;
5952 5955
5953 /* Bit 0 of register 11 indicates FIFO overflow */ 5956 /* Bit 0 of register 11 indicates FIFO overflow */