Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8679059e authored by Peter Chen's avatar Peter Chen Committed by Felipe Balbi
Browse files

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: default avatarPeter Chen <peter.chen@freescale.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 2d1f7af3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;