diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-05-18 15:40:42 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-20 16:35:42 +0400 |
commit | 4ad34da0300d7196be25ef79ef3f054756cdc739 (patch) | |
tree | 606b0b26f019b1ad459b14c7aafa6d280b6b2072 /drivers/media/video/gspca/finepix.c | |
parent | fed07f848888267d5991b9446e103f35aaeb58d8 (diff) | |
download | linux-4ad34da0300d7196be25ef79ef3f054756cdc739.tar.xz |
[media] gspca: the field 'frozen' is under CONFIG_PM
The gspca_dev field 'frozen' is added only if CONFIG_PM is set. So add the
relevant #ifdef's to various subdrivers that use it.
The m32r daily build caught this mistake.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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 && |