mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-11 08:18:47 +00:00
[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>
This commit is contained in:
parent
2532178a68
commit
bc96c0ad1e
@ -1646,6 +1646,9 @@ static int dummy_start (struct usb_hcd *hcd)
|
|||||||
if (!root)
|
if (!root)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
/* only show a low-power port: just 8mA */
|
||||||
|
hcd->power_budget = 8;
|
||||||
|
|
||||||
/* root hub enters addressed state... */
|
/* root hub enters addressed state... */
|
||||||
hcd->state = HC_STATE_RUNNING;
|
hcd->state = HC_STATE_RUNNING;
|
||||||
root->speed = USB_SPEED_HIGH;
|
root->speed = USB_SPEED_HIGH;
|
||||||
@ -1655,9 +1658,6 @@ static int dummy_start (struct usb_hcd *hcd)
|
|||||||
goto err1;
|
goto err1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* only show a low-power port: just 8mA */
|
|
||||||
hub_set_power_budget (root, 8);
|
|
||||||
|
|
||||||
if ((retval = dummy_register_udc (dum)) != 0)
|
if ((retval = dummy_register_udc (dum)) != 0)
|
||||||
goto err2;
|
goto err2;
|
||||||
|
|
||||||
|
@ -699,8 +699,6 @@ retry:
|
|||||||
ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
|
ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
if (ohci->power_budget)
|
|
||||||
hub_set_power_budget(udev, ohci->power_budget);
|
|
||||||
|
|
||||||
register_reboot_notifier (&ohci->reboot_notifier);
|
register_reboot_notifier (&ohci->reboot_notifier);
|
||||||
create_debug_files (ohci);
|
create_debug_files (ohci);
|
||||||
|
@ -181,7 +181,7 @@ static int omap_start_hc(struct ohci_hcd *ohci, struct platform_device *pdev)
|
|||||||
if (config->otg) {
|
if (config->otg) {
|
||||||
ohci_to_hcd(ohci)->self.otg_port = config->otg;
|
ohci_to_hcd(ohci)->self.otg_port = config->otg;
|
||||||
/* default/minimum OTG power budget: 8 mA */
|
/* 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 */
|
/* 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) */
|
/* TPS2045 switch for internal transceiver (port 1) */
|
||||||
if (machine_is_omap_osk()) {
|
if (machine_is_omap_osk()) {
|
||||||
ohci->power_budget = 250;
|
ohci_to_hcd(ohci)->power_budget = 250;
|
||||||
|
|
||||||
rh &= ~RH_A_NOCP;
|
rh &= ~RH_A_NOCP;
|
||||||
|
|
||||||
|
@ -371,7 +371,6 @@ struct ohci_hcd {
|
|||||||
* other external transceivers should be software-transparent
|
* other external transceivers should be software-transparent
|
||||||
*/
|
*/
|
||||||
struct otg_transceiver *transceiver;
|
struct otg_transceiver *transceiver;
|
||||||
unsigned power_budget;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* memory management for queue data structures
|
* memory management for queue data structures
|
||||||
|
@ -1574,8 +1574,10 @@ sl811h_start(struct usb_hcd *hcd)
|
|||||||
udev->speed = USB_SPEED_FULL;
|
udev->speed = USB_SPEED_FULL;
|
||||||
hcd->state = HC_STATE_RUNNING;
|
hcd->state = HC_STATE_RUNNING;
|
||||||
|
|
||||||
if (sl811->board)
|
if (sl811->board) {
|
||||||
hcd->can_wakeup = sl811->board->can_wakeup;
|
hcd->can_wakeup = sl811->board->can_wakeup;
|
||||||
|
hcd->power_budget = sl811->board->power * 2;
|
||||||
|
}
|
||||||
|
|
||||||
if (usb_hcd_register_root_hub(udev, hcd) != 0) {
|
if (usb_hcd_register_root_hub(udev, hcd) != 0) {
|
||||||
usb_put_dev(udev);
|
usb_put_dev(udev);
|
||||||
@ -1583,9 +1585,6 @@ sl811h_start(struct usb_hcd *hcd)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sl811->board && sl811->board->power)
|
|
||||||
hub_set_power_budget(udev, sl811->board->power * 2);
|
|
||||||
|
|
||||||
/* enable power and interupts */
|
/* enable power and interupts */
|
||||||
port_power(sl811, 1);
|
port_power(sl811, 1);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user