Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306508
b: refs/heads/master
c: 4ad34da
h: refs/heads/master
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed May 20, 2012
1 parent 1dd0ee5 commit 42cbb94
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fed07f848888267d5991b9446e103f35aaeb58d8
refs/heads/master: 4ad34da0300d7196be25ef79ef3f054756cdc739
20 changes: 15 additions & 5 deletions trunk/drivers/media/video/gspca/finepix.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,23 @@ static void dostream(struct work_struct *work)

/* loop reading a frame */
again:
while (!gspca_dev->frozen && gspca_dev->dev && gspca_dev->streaming) {
while (gspca_dev->dev && gspca_dev->streaming) {
#ifdef CONFIG_PM
if (gspca_dev->frozen)
break;
#endif

/* request a frame */
mutex_lock(&gspca_dev->usb_lock);
ret = command(gspca_dev, 1);
mutex_unlock(&gspca_dev->usb_lock);
if (ret < 0)
break;
if (gspca_dev->frozen || !gspca_dev->dev ||
!gspca_dev->streaming)
#ifdef CONFIG_PM
if (gspca_dev->frozen)
break;
#endif
if (!gspca_dev->dev || !gspca_dev->streaming)
break;

/* the frame comes in parts */
Expand All @@ -118,8 +125,11 @@ static void dostream(struct work_struct *work)
* error. Just restart. */
goto again;
}
if (gspca_dev->frozen || !gspca_dev->dev ||
!gspca_dev->streaming)
#ifdef CONFIG_PM
if (gspca_dev->frozen)
goto out;
#endif
if (!gspca_dev->dev || !gspca_dev->streaming)
goto out;
if (len < FPIX_MAX_TRANSFER ||
(data[len - 2] == 0xff &&
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/media/video/gspca/jl2005bcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,11 @@ static void jl2005c_dostream(struct work_struct *work)
goto quit_stream;
}

while (!gspca_dev->frozen && gspca_dev->dev && gspca_dev->streaming) {
while (gspca_dev->dev && gspca_dev->streaming) {
#ifdef CONFIG_PM
if (gspca_dev->frozen)
break;
#endif
/* Check if this is a new frame. If so, start the frame first */
if (!header_read) {
mutex_lock(&gspca_dev->usb_lock);
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/media/video/gspca/sq905.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,11 @@ static void sq905_dostream(struct work_struct *work)
frame_sz = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].sizeimage
+ FRAME_HEADER_LEN;

while (!gspca_dev->frozen && gspca_dev->dev && gspca_dev->streaming) {
while (gspca_dev->dev && gspca_dev->streaming) {
#ifdef CONFIG_PM
if (gspca_dev->frozen)
break;
#endif
/* request some data and then read it until we have
* a complete frame. */
bytes_left = frame_sz;
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/media/video/gspca/sq905c.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,11 @@ static void sq905c_dostream(struct work_struct *work)
goto quit_stream;
}

while (!gspca_dev->frozen && gspca_dev->dev && gspca_dev->streaming) {
while (gspca_dev->dev && gspca_dev->streaming) {
#ifdef CONFIG_PM
if (gspca_dev->frozen)
break;
#endif
/* Request the header, which tells the size to download */
ret = usb_bulk_msg(gspca_dev->dev,
usb_rcvbulkpipe(gspca_dev->dev, 0x81),
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/media/video/gspca/vicam.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,11 @@ static void vicam_dostream(struct work_struct *work)
goto exit;
}

while (!gspca_dev->frozen && gspca_dev->dev && gspca_dev->streaming) {
while (gspca_dev->dev && gspca_dev->streaming) {
#ifdef CONFIG_PM
if (gspca_dev->frozen)
break;
#endif
ret = vicam_read_frame(gspca_dev, buffer, frame_sz);
if (ret < 0)
break;
Expand Down
7 changes: 5 additions & 2 deletions trunk/drivers/media/video/gspca/zc3xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -5946,8 +5946,11 @@ static void transfer_update(struct work_struct *work)
msleep(100);

mutex_lock(&gspca_dev->usb_lock);
if (gspca_dev->frozen || !gspca_dev->dev ||
!gspca_dev->streaming)
#ifdef CONFIG_PM
if (gspca_dev->frozen)
goto err;
#endif
if (!gspca_dev->dev || !gspca_dev->streaming)
goto err;

/* Bit 0 of register 11 indicates FIFO overflow */
Expand Down

0 comments on commit 42cbb94

Please sign in to comment.