From 9f6e60eee69a35b1144488b8061004833a62c3f0 Mon Sep 17 00:00:00 2001 From: William Wu Date: Thu, 26 Apr 2018 10:05:02 +0800 Subject: [PATCH] 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 Signed-off-by: Frank Wang --- drivers/media/usb/uvc/uvc_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c index b5ab43090e13..4ce14b6bc5cb 100644 --- a/drivers/media/usb/uvc/uvc_driver.c +++ b/drivers/media/usb/uvc/uvc_driver.c @@ -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);