uvcvideo: add quirk for dev parent with broken auto suspend

If the parent of uvc device has a quirk for broken
auto-suspend function (e.g. rk3328 usb 3.0 root hub),
we also need to disable auto-suspend for the uvc device.

Change-Id: Ida8d05a411f49f39e13cad3ec837a56598b4a630
Signed-off-by: William Wu <william.wu@rock-chips.com>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
This commit is contained in:
William Wu 2018-04-26 10:05:02 +08:00 committed by Tao Huang
parent f078cc7762
commit 9f6e60eee6

View File

@ -2310,7 +2310,8 @@ static int uvc_probe(struct usb_interface *intf,
}
uvc_trace(UVC_TRACE_PROBE, "UVC device initialized.\n");
if (udev->quirks & USB_QUIRK_AUTO_SUSPEND)
if (udev->quirks & USB_QUIRK_AUTO_SUSPEND ||
udev->parent->quirks & USB_QUIRK_AUTO_SUSPEND)
uvc_printk(KERN_INFO, "auto-suspend is blacklisted for this device\n");
else
usb_enable_autosuspend(udev);