Hi Hans, On 05/18/2012 01:43 PM, Hans Verkuil wrote: > The field 'frozen' is only there if CONFIG_PM is set, so don't use it > directly, always check for CONFIG_PM first. If it is safe to assume that for !CONFIG_PM the field 'frozen' is always zero, wouldn't it be better to create a macro in a header file, something like: #ifdef CONFIG_PM #define gspca_pm_frozen(__dev) ((__dev)->frozen) #else #define gspca_pm_frozen(__dev) (0) #endif and use it instead ? diff --git a/drivers/media/video/gspca/sq905.c b/drivers/media/video/gspca/sq905.c index a144ce7..04f5465 100644 (file) --- 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_pm_frozen(gspca_dev) && gspca_dev->dev && gspca_dev->streaming) { I really hate #ifdefs ... :-) -- Regards, Sylwester > Regards, > > Hans > > The following changes since commit 61282daf505f3c8def09332ca337ac257b792029: > > [media] V4L2: mt9t112: fixup JPEG initialization workaround (2012-05-15 16:15:35 -0300) > > are available in the git repository at: > > git://linuxtv.org/hverkuil/media_tree.git frozenfix > > for you to fetch changes up to 4ba342204948e9df49dc1f639ffdbfe49579e626: > > gspca: the field 'frozen' is under CONFIG_PM (2012-05-18 13:40:42 +0200) > > ---------------------------------------------------------------- > Hans Verkuil (1): > gspca: the field 'frozen' is under CONFIG_PM > > drivers/media/video/gspca/finepix.c | 20 +++++++++++++++----- > drivers/media/video/gspca/jl2005bcd.c | 6 +++++- > drivers/media/video/gspca/sq905.c | 6 +++++- > drivers/media/video/gspca/sq905c.c | 6 +++++- > drivers/media/video/gspca/vicam.c | 6 +++++- > drivers/media/video/gspca/zc3xx.c | 7 +++++-- > 6 files changed, 40 insertions(+), 11 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html