lkml.org 
[lkml]   [2007]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.6.23-rc1-mm1: chipsfb_pci_suspend problem
Hi!

> > > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc1/2.6.23-rc1-mm1/
> > >
> > > from pm-move-definition-of-struct-pm_ops-to-suspendh.patch :
> > >
> > > drivers/video/chipsfb.c: In function 'chipsfb_pci_suspend':
> > > drivers/video/chipsfb.c:461: error: 'PM_SUSPEND_MEM' undeclared (first use in this function)
> > > drivers/video/chipsfb.c:461: error: (Each undeclared identifier is reported only once
> > > drivers/video/chipsfb.c:461: error: for each function it appears in.)
> >
> > Well, actually, this is a bug in chipsfb.c, as it shouldn't use PM_SUSPEND_MEM
> > in there, but PMSG_SUSPEND (patch untested).
> >
> > ---
> > drivers/video/chipsfb.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > Index: linux-2.6.23-rc1/drivers/video/chipsfb.c
> > ===================================================================
> > --- linux-2.6.23-rc1.orig/drivers/video/chipsfb.c
> > +++ linux-2.6.23-rc1/drivers/video/chipsfb.c
> > @@ -458,7 +458,7 @@ static int chipsfb_pci_suspend(struct pc
> >
> > if (state.event == pdev->dev.power.power_state.event)
> > return 0;
> > - if (state.event != PM_SUSPEND_MEM)
> > + if (state != PMSG_SUSPEND)
> > goto done;
> >
> > acquire_console_sem();
>
> For reasons which aren't immediately obvious, the compiler didn't like
> that: comparing with an immediate struct liek that is a bit tricky.

Yes, that was deliberate "type safety".

> This is equivalent, and works:
>
>
> --- a/drivers/video/chipsfb.c~chipsfb-use-correct-pm-state
> +++ a/drivers/video/chipsfb.c
> @@ -24,6 +24,7 @@
> #include <linux/delay.h>
> #include <linux/interrupt.h>
> #include <linux/fb.h>
> +#include <linux/pm.h>
> #include <linux/init.h>
> #include <linux/pci.h>
> #include <linux/console.h>
> @@ -458,7 +459,7 @@ static int chipsfb_pci_suspend(struct pc
>
> if (state.event == pdev->dev.power.power_state.event)
> return 0;
> - if (state.event != PM_SUSPEND_MEM)
> + if (state.event != PM_EVENT_SUSPEND)

And this is indeed correct. ACK.

> Is this a 2.6.23 thing?

Should not hurt anything, i'd say so.
Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-26 00:49    [W:0.178 / U:0.744 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site