summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2014-01-03 16:45:13 +0800
committerFelipe Balbi <balbi@ti.com>2014-02-20 09:17:22 -0600
commit8679059e360543b7afecd228ada6566da9f304a4 (patch)
tree43051f673bd631298cdd5512beb029c792fc9533 /drivers
parent2d1f7af3d60dd09794e0738a915d272c6c27abc5 (diff)
downloadlinux-8679059e360543b7afecd228ada6566da9f304a4.tar.bz2
usb: gadget: printer: using gadget_is_otg to check otg support at runtime
We need to use gadget_is_otg to check if the gadget is really otg support at runtime, other composite gadget drivers have already followed this method. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/printer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c
index bf7a56b6d48a..69b76efd11e9 100644
--- a/drivers/usb/gadget/printer.c
+++ b/drivers/usb/gadget/printer.c
@@ -1157,7 +1157,7 @@ static int __init printer_bind_config(struct usb_configuration *c)
usb_gadget_set_selfpowered(gadget);
- if (gadget->is_otg) {
+ if (gadget_is_otg(gadget)) {
otg_descriptor.bmAttributes |= USB_OTG_HNP;
printer_cfg_driver.descriptors = otg_desc;
printer_cfg_driver.bmAttributes |= USB_CONFIG_ATT_WAKEUP;