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?
- Dave
--- 1.116/drivers/usb/core/hub.c Sun May 9 10:26:14 2004
+++ edited/drivers/usb/core/hub.c Wed May 12 15:02:16 2004
@@ -268,10 +268,12 @@
}
resubmit:
+#ifdef CONFIG_PM
if (hub->intf->dev.power.power_state) {
urb->status = -EHOSTUNREACH;
goto done;
}
+#endif
if ((status = usb_submit_urb (hub->urb, GFP_ATOMIC)) != 0
/* ENODEV means we raced disconnect() */
&& status != -ENODEV)
--- 1.36/drivers/usb/host/ehci-dbg.c Fri May 7 12:48:33 2004
+++ edited/drivers/usb/host/ehci-dbg.c Wed May 12 15:01:35 2004
@@ -639,6 +639,7 @@
spin_lock_irqsave (&ehci->lock, flags);
+#ifdef CONFIG_PM
if (bus->controller->power.power_state) {
size = scnprintf (next, size,
"bus %s, device %s (driver " DRIVER_VERSION ")\n"
@@ -647,6 +648,7 @@
hcd->self.controller->bus_id);
goto done;
}
+#endif
/* Capability Registers */
i = HC_VERSION(readl (&ehci->caps->hc_capbase));
@@ -724,7 +726,9 @@
next += temp;
#endif
+#ifdef CONFIG_PM
done:
+#endif
spin_unlock_irqrestore (&ehci->lock, flags);
return PAGE_SIZE - size;
--- 1.27/drivers/usb/host/ohci-dbg.c Tue May 4 20:59:56 2004
+++ edited/drivers/usb/host/ohci-dbg.c Wed May 12 15:01:17 2004
@@ -623,11 +623,13 @@
hcd->self.controller->bus_id,
hcd_name);
+#ifdef CONFIG_PM
if (bus->controller->power.power_state) {
size -= scnprintf (next, size,
"SUSPENDED (no register access)\n");
goto done;
}
+#endif
ohci_dump_status(ohci, &next, &size);
@@ -667,7 +669,9 @@
/* roothub */
ohci_dump_roothub (ohci, 1, &next, &size);
+#ifdef CONFIG_PM
done:
+#endif
spin_unlock_irqrestore (&ohci->lock, flags);
return PAGE_SIZE - size;
}
--- 1.20/drivers/usb/host/ohci-hub.c Sun May 9 10:35:38 2004
+++ edited/drivers/usb/host/ohci-hub.c Wed May 12 15:00:49 2004
@@ -310,7 +310,7 @@
static void ohci_rh_resume (void *_hcd)
{
- struct ohci_hcd *ohci = hcd_to_ohci (hcd);
+ struct ohci_hcd *ohci = hcd_to_ohci (_hcd);
ohci_dbg(ohci, "rh_resume ??\n");
}
