From: Jonas Andersson Date: Mon, 21 Mar 2011 13:54:09 +0000 (+0100) Subject: USB: g_printer required set interface request X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a0c25c20502e0c4a467f5d7e27b2a599cfe57abe;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Greg Kroah-Hartman --- 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) else if (gadget->a_alt_hnp_support) DBG(dev, "HNP needs a different root port\n"); value = printer_set_config(dev, wValue); + if (!value) + value = set_interface(dev, PRINTER_INTERFACE); break; case USB_REQ_GET_CONFIGURATION: if (ctrl->bRequestType != USB_DIR_IN)