diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2005-04-25 11:21:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-27 17:43:49 -0400 |
commit | bc96c0ad1ed0c938fefc0423aa99f086c5a2a1ea (patch) | |
tree | 8283e540734b08d537dedf044f28c65a5ae64d63 | |
parent | 2532178a68b5ce4e421d50ea1b1dcc0a1359f19d (diff) |
[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>
-rw-r--r-- | drivers/usb/gadget/dummy_hcd.c | 6 | ||||
-rw-r--r-- | drivers/usb/host/ohci-hcd.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-omap.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/ohci.h | 1 | ||||
-rw-r--r-- | drivers/usb/host/sl811-hcd.c | 7 |
5 files changed, 8 insertions, 12 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index c039d2fbe7ab..9d37fc771b27 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c | |||
@@ -1646,6 +1646,9 @@ static int dummy_start (struct usb_hcd *hcd) | |||
1646 | if (!root) | 1646 | if (!root) |
1647 | return -ENOMEM; | 1647 | return -ENOMEM; |
1648 | 1648 | ||
1649 | /* only show a low-power port: just 8mA */ | ||
1650 | hcd->power_budget = 8; | ||
1651 | |||
1649 | /* root hub enters addressed state... */ | 1652 | /* root hub enters addressed state... */ |
1650 | hcd->state = HC_STATE_RUNNING; | 1653 | hcd->state = HC_STATE_RUNNING; |
1651 | root->speed = USB_SPEED_HIGH; | 1654 | root->speed = USB_SPEED_HIGH; |
@@ -1655,9 +1658,6 @@ static int dummy_start (struct usb_hcd *hcd) | |||
1655 | goto err1; | 1658 | goto err1; |
1656 | } | 1659 | } |
1657 | 1660 | ||
1658 | /* only show a low-power port: just 8mA */ | ||
1659 | hub_set_power_budget (root, 8); | ||
1660 | |||
1661 | if ((retval = dummy_register_udc (dum)) != 0) | 1661 | if ((retval = dummy_register_udc (dum)) != 0) |
1662 | goto err2; | 1662 | goto err2; |
1663 | 1663 | ||
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 32120042ab65..0da996191251 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
@@ -699,8 +699,6 @@ retry: | |||
699 | ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); | 699 | ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); |
700 | return -ENODEV; | 700 | return -ENODEV; |
701 | } | 701 | } |
702 | if (ohci->power_budget) | ||
703 | hub_set_power_budget(udev, ohci->power_budget); | ||
704 | 702 | ||
705 | register_reboot_notifier (&ohci->reboot_notifier); | 703 | register_reboot_notifier (&ohci->reboot_notifier); |
706 | create_debug_files (ohci); | 704 | create_debug_files (ohci); |
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index 8aab5907afe9..b62d69937694 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) | |||
181 | if (config->otg) { | 181 | if (config->otg) { |
182 | ohci_to_hcd(ohci)->self.otg_port = config->otg; | 182 | ohci_to_hcd(ohci)->self.otg_port = config->otg; |
183 | /* default/minimum OTG power budget: 8 mA */ | 183 | /* default/minimum OTG power budget: 8 mA */ |
184 | ohci->power_budget = 8; | 184 | ohci_to_hcd(ohci)->power_budget = 8; |
185 | } | 185 | } |
186 | 186 | ||
187 | /* boards can use OTG transceivers in non-OTG modes */ | 187 | /* 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) | |||
230 | 230 | ||
231 | /* TPS2045 switch for internal transceiver (port 1) */ | 231 | /* TPS2045 switch for internal transceiver (port 1) */ |
232 | if (machine_is_omap_osk()) { | 232 | if (machine_is_omap_osk()) { |
233 | ohci->power_budget = 250; | 233 | ohci_to_hcd(ohci)->power_budget = 250; |
234 | 234 | ||
235 | rh &= ~RH_A_NOCP; | 235 | rh &= ~RH_A_NOCP; |
236 | 236 | ||
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h index 3dbc7c0eed43..71cdd2262860 100644 --- a/drivers/usb/host/ohci.h +++ b/drivers/usb/host/ohci.h | |||
@@ -371,7 +371,6 @@ struct ohci_hcd { | |||
371 | * other external transceivers should be software-transparent | 371 | * other external transceivers should be software-transparent |
372 | */ | 372 | */ |
373 | struct otg_transceiver *transceiver; | 373 | struct otg_transceiver *transceiver; |
374 | unsigned power_budget; | ||
375 | 374 | ||
376 | /* | 375 | /* |
377 | * memory management for queue data structures | 376 | * memory management for queue data structures |
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index 99d43f758ad0..1f2d00fe983a 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) | |||
1574 | udev->speed = USB_SPEED_FULL; | 1574 | udev->speed = USB_SPEED_FULL; |
1575 | hcd->state = HC_STATE_RUNNING; | 1575 | hcd->state = HC_STATE_RUNNING; |
1576 | 1576 | ||
1577 | if (sl811->board) | 1577 | if (sl811->board) { |
1578 | hcd->can_wakeup = sl811->board->can_wakeup; | 1578 | hcd->can_wakeup = sl811->board->can_wakeup; |
1579 | hcd->power_budget = sl811->board->power * 2; | ||
1580 | } | ||
1579 | 1581 | ||
1580 | if (usb_hcd_register_root_hub(udev, hcd) != 0) { | 1582 | if (usb_hcd_register_root_hub(udev, hcd) != 0) { |
1581 | usb_put_dev(udev); | 1583 | usb_put_dev(udev); |
@@ -1583,9 +1585,6 @@ sl811h_start(struct usb_hcd *hcd) | |||
1583 | return -ENODEV; | 1585 | return -ENODEV; |
1584 | } | 1586 | } |
1585 | 1587 | ||
1586 | if (sl811->board && sl811->board->power) | ||
1587 | hub_set_power_budget(udev, sl811->board->power * 2); | ||
1588 | |||
1589 | /* enable power and interupts */ | 1588 | /* enable power and interupts */ |
1590 | port_power(sl811, 1); | 1589 | port_power(sl811, 1); |
1591 | 1590 | ||