diff options
Diffstat (limited to 'drivers/media/video/gspca/finepix.c')
-rw-r--r-- | drivers/media/video/gspca/finepix.c | 20 |
1 files changed, 15 insertions, 5 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) /* 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); @@ -102,8 +106,11 @@ again: 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 */ @@ -118,8 +125,11 @@ again: * 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 && |