summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/sq905.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-05-18 08:40:42 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-20 09:35:42 -0300
commit4ad34da0300d7196be25ef79ef3f054756cdc739 (patch)
tree606b0b26f019b1ad459b14c7aafa6d280b6b2072 /drivers/media/video/gspca/sq905.c
parentfed07f848888267d5991b9446e103f35aaeb58d8 (diff)
[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/sq905.c')
-rw-r--r--drivers/media/video/gspca/sq905.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/sq905.c b/drivers/media/video/gspca/sq905.c
index a144ce759b6..04f54654a02 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)
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;