Skip to contentSkip to conversation

uvc: Enable USB autosuspend by default on uvcvideo

PATCH In review Matthew Garrett 4 participants 5 messages Sep 16, 2010 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 uvc: Enable USB autosuspend by default on uvcvideo

We've been doing this for a while in Fedora without any complaints.

---
 drivers/media/video/uvc/uvc_driver.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/media/video/uvc/uvc_driver.c +1 -0
index 8bdd940..28ed5b4 100644
@@ -1814,6 +1814,7 @@ static int uvc_probe(struct usb_interface *intf,
 	}
 
 	uvc_trace(UVC_TRACE_PROBE, "UVC device initialized.\n");
+	usb_enable_autosuspend(udev);
 	return 0;
 
 error:
Signature · 1 line
1.7.2.3
#1 lore raw
Quoted 1 line · Matthew Garrett

We've been doing this for a while in Fedora without any complaints.

No complaints probably, but does it actually do anything? Last time I measured, it didn't, but that was in the .31 kernel days.

thanks,

greg k-h

#2 lore raw
Quoted 5 lines · Greg KH
Quoted 1 line · Matthew Garrett

We've been doing this for a while in Fedora without any complaints.

No complaints probably, but does it actually do anything? Last time I measured, it didn't, but that was in the .31 kernel days.

It's necessary if you want to be able to do runtime PCI power management on the HCD.

Signature · 1 line
Matthew Garrett | [email protected]
#3 lore raw
Quoted 9 lines · Matthew Garrett
Quoted 5 lines · Greg KH
Quoted 1 line · Matthew Garrett

We've been doing this for a while in Fedora without any complaints.

No complaints probably, but does it actually do anything? Last time I measured, it didn't, but that was in the .31 kernel days.

It's necessary if you want to be able to do runtime PCI power management on the HCD.

Ok, fair enough, no objection from me.

thanks,

greg k-h

Acked-by on v1 1/1
#4 lore raw
In reply to Matthew Garrett

Hi Matthew,

Thanks for the patch.

Quoted 1 line · On Thursday 16 September 2010 20:00:04 Matthew Garrett wrote:

We've been doing this for a while in Fedora without any complaints.

I'll trust you on that. If users start complaining I'll tell them who to blame ;-)

Quoted 1 line

(although, if you need to resubmit the patch for any reason, I'd rather like the usb_enable_autosuspend call to be before the uvc_trace call).

Quoted 16 lines
---
 drivers/media/video/uvc/uvc_driver.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
(quoted diff) +0 -0

b/drivers/media/video/uvc/uvc_driver.c index 8bdd940..28ed5b4 100644

drivers/media/video/uvc/uvc_driver.c +1 -0
@@ -1814,6 +1814,7 @@ static int uvc_probe(struct usb_interface *intf,
 	}
 
 	uvc_trace(UVC_TRACE_PROBE, "UVC device initialized.\n");
+	usb_enable_autosuspend(udev);
 	return 0;
 
 error:
Signature · 3 lines
Regards,

Laurent Pinchart