aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/printer.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget/printer.c')
-rw-r--r--drivers/usb/gadget/printer.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c
index 2b3b9e1dd2ee..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 = {
@@ -1278,8 +1278,7 @@ unknown:
1278 /* respond with data transfer before status phase? */ 1278 /* respond with data transfer before status phase? */
1279 if (value >= 0) { 1279 if (value >= 0) {
1280 req->length = value; 1280 req->length = value;
1281 req->zero = value < wLength 1281 req->zero = value < wLength;
1282 && (value % gadget->ep0->maxpacket) == 0;
1283 value = usb_ep_queue(gadget->ep0, req, GFP_ATOMIC); 1282 value = usb_ep_queue(gadget->ep0, req, GFP_ATOMIC);
1284 if (value < 0) { 1283 if (value < 0) {
1285 DBG(dev, "ep_queue --> %d\n", value); 1284 DBG(dev, "ep_queue --> %d\n", value);
@@ -1477,7 +1476,6 @@ autoconf_fail:
1477 if (gadget->is_otg) { 1476 if (gadget->is_otg) {
1478 otg_desc.bmAttributes |= USB_OTG_HNP, 1477 otg_desc.bmAttributes |= USB_OTG_HNP,
1479 config_desc.bmAttributes |= USB_CONFIG_ATT_WAKEUP; 1478 config_desc.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
1480 config_desc.bMaxPower = 4;
1481 } 1479 }
1482 1480
1483 spin_lock_init(&dev->lock); 1481 spin_lock_init(&dev->lock);