[PATCH] usbcore: Remove hub_set_power_budget
This patch removes the hub_set_power_budget routine, which was used by a couple of HCDs to indicate that the root hub was running on battery power. In its place is a new field added to struct usb_hcd, which HCDs can set before the root hub is registered. Special-case code in the hub driver knows to look at this field when configuring a root hub. 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:
committed by
Greg Kroah-Hartman
parent
f58f97fa9d
commit
7d35b92985
@@ -224,15 +224,4 @@ struct usb_hub {
|
||||
struct work_struct leds;
|
||||
};
|
||||
|
||||
/* use this for low-powered root hubs */
|
||||
static inline void
|
||||
hub_set_power_budget (struct usb_device *hubdev, unsigned mA)
|
||||
{
|
||||
struct usb_hub *hub;
|
||||
|
||||
hub = (struct usb_hub *)
|
||||
usb_get_intfdata (hubdev->actconfig->interface[0]);
|
||||
hub->power_budget = min(mA,(unsigned)500)/2;
|
||||
}
|
||||
|
||||
#endif /* __LINUX_HUB_H */
|
||||
|
Reference in New Issue
Block a user