From e727a16cf1679c298ea6a24082ac20cd858f5660 Mon Sep 17 00:00:00 2001 From: Andrew Thompson Date: Wed, 12 May 2010 22:51:45 +0000 Subject: [PATCH] Add missing ifdefs for usb power saving support. Submitted by: Hans Petter Selasky --- sys/dev/usb/controller/usb_controller.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/controller/usb_controller.c b/sys/dev/usb/controller/usb_controller.c index e91904c33e90..1a9b4742ec27 100644 --- a/sys/dev/usb/controller/usb_controller.c +++ b/sys/dev/usb/controller/usb_controller.c @@ -234,11 +234,12 @@ usb_bus_explore(struct usb_proc_msg *pm) USB_BUS_UNLOCK(bus); +#if USB_HAVE_POWERD /* * First update the USB power state! */ usb_bus_powerd(bus); - +#endif /* Explore the Root USB HUB. */ (udev->hub->explore) (udev); USB_BUS_LOCK(bus); @@ -301,11 +302,13 @@ usb_power_wdog(void *arg) usb_proc_rewakeup(&bus->explore_proc); /* recover from DDB */ #endif +#if USB_HAVE_POWERD USB_BUS_UNLOCK(bus); usb_bus_power_update(bus); USB_BUS_LOCK(bus); +#endif } /*------------------------------------------------------------------------*