From 36e893d25aa2abcae0f11ef263de0e8322641386 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Fri, 12 Sep 2008 09:39:06 -0700 Subject: usb gadget: USB_GADGET_VBUS_DRAW Kconfig option Offer a "how much VBUS power to request" configuration option for USB gadgets that aren't using board-specific customization of their gadget or (composite) configuration drivers. Also remove a couple pointless "depends on USB_GADGET" bits from the Kconfig text; booleans inside an "if USB_GADGET" will already have that dependency. Based on a patch from Justin Clacherty. Signed-off-by: David Brownell Cc: Justin Clacherty Tested-by: Robert Jarzmik Signed-off-by: Greg Kroah-Hartman --- drivers/usb/gadget/file_storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/usb/gadget/file_storage.c') diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index e0f616f39ba0..c4e62a6297d7 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c @@ -851,7 +851,7 @@ config_desc = { .bConfigurationValue = CONFIG_VALUE, .iConfiguration = STRING_CONFIG, .bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER, - .bMaxPower = 1, // self-powered + .bMaxPower = CONFIG_USB_GADGET_VBUS_DRAW / 2, }; static struct usb_otg_descriptor -- cgit v1.2.3