summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2005-04-25 11:21:31 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-27 14:43:49 -0700
commitbc96c0ad1ed0c938fefc0423aa99f086c5a2a1ea (patch)
tree8283e540734b08d537dedf044f28c65a5ae64d63 /drivers/usb/host
parent2532178a68b5ce4e421d50ea1b1dcc0a1359f19d (diff)
downloadop-kernel-dev-bc96c0ad1ed0c938fefc0423aa99f086c5a2a1ea.zip
op-kernel-dev-bc96c0ad1ed0c938fefc0423aa99f086c5a2a1ea.tar.gz
[PATCH] ohci-omap, sl811, dummy: remove hub_set_power_budget
This patch changes the HCDs that used the old hub_set_power_budget call, making them use the new hcd->power_budget field instead. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ohci-hcd.c2
-rw-r--r--drivers/usb/host/ohci-omap.c4
-rw-r--r--drivers/usb/host/ohci.h1
-rw-r--r--drivers/usb/host/sl811-hcd.c7
4 files changed, 5 insertions, 9 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 3212004..0da9961 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -699,8 +699,6 @@ retry:
ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
return -ENODEV;
}
- if (ohci->power_budget)
- hub_set_power_budget(udev, ohci->power_budget);
register_reboot_notifier (&ohci->reboot_notifier);
create_debug_files (ohci);
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index 8aab590..b62d699 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -181,7 +181,7 @@ static int omap_start_hc(struct ohci_hcd *ohci, struct platform_device *pdev)
if (config->otg) {
ohci_to_hcd(ohci)->self.otg_port = config->otg;
/* default/minimum OTG power budget: 8 mA */
- ohci->power_budget = 8;
+ ohci_to_hcd(ohci)->power_budget = 8;
}
/* boards can use OTG transceivers in non-OTG modes */
@@ -230,7 +230,7 @@ static int omap_start_hc(struct ohci_hcd *ohci, struct platform_device *pdev)
/* TPS2045 switch for internal transceiver (port 1) */
if (machine_is_omap_osk()) {
- ohci->power_budget = 250;
+ ohci_to_hcd(ohci)->power_budget = 250;
rh &= ~RH_A_NOCP;
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index 3dbc7c0..71cdd22 100644
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -371,7 +371,6 @@ struct ohci_hcd {
* other external transceivers should be software-transparent
*/
struct otg_transceiver *transceiver;
- unsigned power_budget;
/*
* memory management for queue data structures
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index 99d43f7..1f2d00f 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -1574,8 +1574,10 @@ sl811h_start(struct usb_hcd *hcd)
udev->speed = USB_SPEED_FULL;
hcd->state = HC_STATE_RUNNING;
- if (sl811->board)
+ if (sl811->board) {
hcd->can_wakeup = sl811->board->can_wakeup;
+ hcd->power_budget = sl811->board->power * 2;
+ }
if (usb_hcd_register_root_hub(udev, hcd) != 0) {
usb_put_dev(udev);
@@ -1583,9 +1585,6 @@ sl811h_start(struct usb_hcd *hcd)
return -ENODEV;
}
- if (sl811->board && sl811->board->power)
- hub_set_power_budget(udev, sl811->board->power * 2);
-
/* enable power and interupts */
port_power(sl811, 1);
OpenPOWER on IntegriCloud