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>
This commit is contained in:
William Wu
2018-04-26 10:05:02 +08:00
parent a46f2b4821
commit 801ff69e8b

View File

@@ -2074,7 +2074,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);