diff options
author | Jonas Andersson <jonas@microbit.se> | 2011-03-21 09:54:09 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-29 20:24:31 -0400 |
commit | a0c25c20502e0c4a467f5d7e27b2a599cfe57abe (patch) | |
tree | 810508984bc623c897fe1947b98e900290d44d7c /drivers/usb | |
parent | a8779ee94e6114bf071ef3ca6c8c9cb270d179ed (diff) |
USB: g_printer required set interface request
g_printer reqiured "set interface" request from host. Not all hosts send
this request. This patch enable the interface when it get "set
configuration" request from host.
Signed-off-by: Jonas Andersson <jonas@microbit.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/printer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index c3f2bd42bd5a..271ef94668e7 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c | |||
@@ -1189,6 +1189,8 @@ printer_setup(struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl) | |||
1189 | else if (gadget->a_alt_hnp_support) | 1189 | else if (gadget->a_alt_hnp_support) |
1190 | DBG(dev, "HNP needs a different root port\n"); | 1190 | DBG(dev, "HNP needs a different root port\n"); |
1191 | value = printer_set_config(dev, wValue); | 1191 | value = printer_set_config(dev, wValue); |
1192 | if (!value) | ||
1193 | value = set_interface(dev, PRINTER_INTERFACE); | ||
1192 | break; | 1194 | break; |
1193 | case USB_REQ_GET_CONFIGURATION: | 1195 | case USB_REQ_GET_CONFIGURATION: |
1194 | if (ctrl->bRequestType != USB_DIR_IN) | 1196 | if (ctrl->bRequestType != USB_DIR_IN) |