* [GIT PULL FOR v3.5] Fix gspca compile error if CONFIG_PM is not set
@ 2012-05-18 11:43 Hans Verkuil
2012-05-18 19:32 ` Sylwester Nawrocki
0 siblings, 1 reply; 2+ messages in thread
From: Hans Verkuil @ 2012-05-18 11:43 UTC (permalink / raw)
To: linux-media; +Cc: Hans de Goede
The field 'frozen' is only there if CONFIG_PM is set, so don't use it
directly, always check for CONFIG_PM first.
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(-)
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [GIT PULL FOR v3.5] Fix gspca compile error if CONFIG_PM is not set
2012-05-18 11:43 [GIT PULL FOR v3.5] Fix gspca compile error if CONFIG_PM is not set Hans Verkuil
@ 2012-05-18 19:32 ` Sylwester Nawrocki
0 siblings, 0 replies; 2+ messages in thread
From: Sylwester Nawrocki @ 2012-05-18 19:32 UTC (permalink / raw)
To: Hans Verkuil; +Cc: linux-media, Hans de Goede
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(-)
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-18 19:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-18 11:43 [GIT PULL FOR v3.5] Fix gspca compile error if CONFIG_PM is not set Hans Verkuil
2012-05-18 19:32 ` Sylwester Nawrocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).