Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113853
b: refs/heads/master
c: 9b0ae86
h: refs/heads/master
i:
  113851: 606c13f
v: v3
  • Loading branch information
Laurent Pinchart authored and Mauro Carvalho Chehab committed Oct 12, 2008
1 parent c7d92df commit 18df76f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 14d962602c8bf86e63c9b9272be1f0360d0a448a
refs/heads/master: 9b0ae867a6fd3035e97e6c33bc07a5bfd7c0f96c
15 changes: 13 additions & 2 deletions trunk/drivers/media/video/uvc/uvc_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,7 @@ static int uvc_suspend(struct usb_interface *intf, pm_message_t message)
return uvc_video_suspend(&dev->video);
}

static int uvc_resume(struct usb_interface *intf)
static int __uvc_resume(struct usb_interface *intf, int reset)
{
struct uvc_device *dev = usb_get_intfdata(intf);
int ret;
Expand All @@ -1672,7 +1672,7 @@ static int uvc_resume(struct usb_interface *intf)
intf->cur_altsetting->desc.bInterfaceNumber);

if (intf->cur_altsetting->desc.bInterfaceSubClass == SC_VIDEOCONTROL) {
if ((ret = uvc_ctrl_resume_device(dev)) < 0)
if (reset && (ret = uvc_ctrl_resume_device(dev)) < 0)
return ret;

return uvc_status_resume(dev);
Expand All @@ -1687,6 +1687,16 @@ static int uvc_resume(struct usb_interface *intf)
return uvc_video_resume(&dev->video);
}

static int uvc_resume(struct usb_interface *intf)
{
return __uvc_resume(intf, 0);
}

static int uvc_reset_resume(struct usb_interface *intf)
{
return __uvc_resume(intf, 1);
}

/* ------------------------------------------------------------------------
* Driver initialization and cleanup
*/
Expand Down Expand Up @@ -1952,6 +1962,7 @@ struct uvc_driver uvc_driver = {
.disconnect = uvc_disconnect,
.suspend = uvc_suspend,
.resume = uvc_resume,
.reset_resume = uvc_reset_resume,
.id_table = uvc_ids,
.supports_autosuspend = 1,
},
Expand Down

0 comments on commit 18df76f

Please sign in to comment.