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>
This commit is contained in:
Родитель
2d1f7af3d6
Коммит
8679059e36
|
@ -1157,7 +1157,7 @@ static int __init printer_bind_config(struct usb_configuration *c)
|
||||||
|
|
||||||
usb_gadget_set_selfpowered(gadget);
|
usb_gadget_set_selfpowered(gadget);
|
||||||
|
|
||||||
if (gadget->is_otg) {
|
if (gadget_is_otg(gadget)) {
|
||||||
otg_descriptor.bmAttributes |= USB_OTG_HNP;
|
otg_descriptor.bmAttributes |= USB_OTG_HNP;
|
||||||
printer_cfg_driver.descriptors = otg_desc;
|
printer_cfg_driver.descriptors = otg_desc;
|
||||||
printer_cfg_driver.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
|
printer_cfg_driver.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче