Greg KH wrote:
On Wed, May 12, 2004 at 02:53:57PM -0700, David Brownell wrote:
Your recent patches cause build failures when CONFIG_PM isn't defined,
because then struct dev_pm_info doesn't have any members. In particular,
there is no power_state.
And this patch should resolve that problem. Greg?
Ick. That's one _ugly_ patch. And it doesn't apply against my current
tree :(
The latter is easier to deal with ... :)
Any way you can do this without all of the nasty #ifdefs?
They all cover logic like
if (SOMETHING->dev.power.power_state) {
...
}
How about something like this in <linux/pm.h>:
static inline int
device_pm_is_lowpower (struct dev_pm_info *info)
{
#ifdef CONFIG_PM
return info->power_state != 0;
#else
return 0;
#endif
}
and having the tests use that instead? Having the guts of that
struct vanish based on a config option would seem to force either
conditional accessors like that, or nasty #ifdeffery.
- Dave
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel