aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/sq905c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca/sq905c.c')
-rw-r--r--drivers/media/video/gspca/sq905c.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/gspca/sq905c.c b/drivers/media/video/gspca/sq905c.c
index ae783634712f..720c187f6ec7 100644
--- a/drivers/media/video/gspca/sq905c.c
+++ b/drivers/media/video/gspca/sq905c.c
@@ -150,7 +150,7 @@ static void sq905c_dostream(struct work_struct *work)
150 goto quit_stream; 150 goto quit_stream;
151 } 151 }
152 152
153 while (gspca_dev->present && gspca_dev->streaming) { 153 while (!gspca_dev->frozen && gspca_dev->dev && gspca_dev->streaming) {
154 /* Request the header, which tells the size to download */ 154 /* Request the header, which tells the size to download */
155 ret = usb_bulk_msg(gspca_dev->dev, 155 ret = usb_bulk_msg(gspca_dev->dev,
156 usb_rcvbulkpipe(gspca_dev->dev, 0x81), 156 usb_rcvbulkpipe(gspca_dev->dev, 0x81),
@@ -169,7 +169,7 @@ static void sq905c_dostream(struct work_struct *work)
169 packet_type = FIRST_PACKET; 169 packet_type = FIRST_PACKET;
170 gspca_frame_add(gspca_dev, packet_type, 170 gspca_frame_add(gspca_dev, packet_type,
171 buffer, FRAME_HEADER_LEN); 171 buffer, FRAME_HEADER_LEN);
172 while (bytes_left > 0 && gspca_dev->present) { 172 while (bytes_left > 0 && gspca_dev->dev) {
173 data_len = bytes_left > SQ905C_MAX_TRANSFER ? 173 data_len = bytes_left > SQ905C_MAX_TRANSFER ?
174 SQ905C_MAX_TRANSFER : bytes_left; 174 SQ905C_MAX_TRANSFER : bytes_left;
175 ret = usb_bulk_msg(gspca_dev->dev, 175 ret = usb_bulk_msg(gspca_dev->dev,
@@ -191,7 +191,7 @@ static void sq905c_dostream(struct work_struct *work)
191 } 191 }
192 } 192 }
193quit_stream: 193quit_stream:
194 if (gspca_dev->present) { 194 if (gspca_dev->dev) {
195 mutex_lock(&gspca_dev->usb_lock); 195 mutex_lock(&gspca_dev->usb_lock);
196 sq905c_command(gspca_dev, SQ905C_CLEAR, 0); 196 sq905c_command(gspca_dev, SQ905C_CLEAR, 0);
197 mutex_unlock(&gspca_dev->usb_lock); 197 mutex_unlock(&gspca_dev->usb_lock);