Re: [linux-usb-devel] [BK PATCH] USB changes for 2.6.6

From: David Brownell
Date: Sun May 16 2004 - 13:33:06 EST


Linus Torvalds wrote:

On Sun, 16 May 2004, David Brownell wrote:

More like this then? I'm not sure whether you'd prefer
to apply that logic to the "struct pm_info" innards too.
That file has multiple CONFIG_PM sections, too.


I was thinking just putting it in the existing wrapper sections.

Wouldn't quite work without moving "struct pm_info" up higher
in the file. Seems like that stuff still isn't fully sorted
out yet, this may not be the best time to start.


The alternative is to just always have "power_state" in the "dev_pm_info", especially as some versions of gcc have had bugs with empty structures anyway.

That sounds like a much simpler fix.

- Dave



--- 1.13/include/linux/pm.h Thu Aug 21 11:47:27 2003
+++ edited/include/linux/pm.h Sun May 16 11:24:38 2004
@@ -229,8 +229,8 @@
struct device;

struct dev_pm_info {
-#ifdef CONFIG_PM
u32 power_state;
+#ifdef CONFIG_PM
u8 * saved_state;
atomic_t pm_users;
struct device * pm_parent;