On Fri, May 14, 2004 at 01:26:45PM -0700, David Brownell wrote:
> >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
>   }

That looks good to me.

thanks,

greg k-h


-------------------------------------------------------
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

Reply via email to