aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/printer.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2008-09-12 12:39:06 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-17 17:40:58 -0400
commit36e893d25aa2abcae0f11ef263de0e8322641386 (patch)
treef103a4c8e94dbd7bf5a04399e2a264893a3e1515 /drivers/usb/gadget/printer.c
parent02582b92f60fa33b68b90263013e98550286db0a (diff)
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 <dbrownell@users.sourceforge.net> Cc: Justin Clacherty <justin@redfish-group.com> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/printer.c')
-rw-r--r--drivers/usb/gadget/printer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c
index 00b7ed5013a6..5a3034fdfe47 100644
--- a/drivers/usb/gadget/printer.c
+++ b/drivers/usb/gadget/printer.c
@@ -252,7 +252,7 @@ static struct usb_config_descriptor config_desc = {
252 .bConfigurationValue = DEV_CONFIG_VALUE, 252 .bConfigurationValue = DEV_CONFIG_VALUE,
253 .iConfiguration = 0, 253 .iConfiguration = 0,
254 .bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER, 254 .bmAttributes = USB_CONFIG_ATT_ONE | USB_CONFIG_ATT_SELFPOWER,
255 .bMaxPower = 1 /* Self-Powered */ 255 .bMaxPower = CONFIG_USB_GADGET_VBUS_DRAW / 2,
256}; 256};
257 257
258static struct usb_interface_descriptor intf_desc = { 258static struct usb_interface_descriptor intf_desc = {
@@ -1476,7 +1476,6 @@ autoconf_fail:
1476 if (gadget->is_otg) { 1476 if (gadget->is_otg) {
1477 otg_desc.bmAttributes |= USB_OTG_HNP, 1477 otg_desc.bmAttributes |= USB_OTG_HNP,
1478 config_desc.bmAttributes |= USB_CONFIG_ATT_WAKEUP; 1478 config_desc.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
1479 config_desc.bMaxPower = 4;
1480 } 1479 }
1481 1480
1482 spin_lock_init(&dev->lock); 1481 spin_lock_init(&dev->lock);