diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/uvc/uvc_driver.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c index 7e102034d38d..4a2d09988fa2 100644 --- a/drivers/media/video/uvc/uvc_driver.c +++ b/drivers/media/video/uvc/uvc_driver.c | |||
@@ -1663,7 +1663,7 @@ static int uvc_suspend(struct usb_interface *intf, pm_message_t message) | |||
1663 | return uvc_video_suspend(&dev->video); | 1663 | return uvc_video_suspend(&dev->video); |
1664 | } | 1664 | } |
1665 | 1665 | ||
1666 | static int uvc_resume(struct usb_interface *intf) | 1666 | static int __uvc_resume(struct usb_interface *intf, int reset) |
1667 | { | 1667 | { |
1668 | struct uvc_device *dev = usb_get_intfdata(intf); | 1668 | struct uvc_device *dev = usb_get_intfdata(intf); |
1669 | int ret; | 1669 | int ret; |
@@ -1672,7 +1672,7 @@ static int uvc_resume(struct usb_interface *intf) | |||
1672 | intf->cur_altsetting->desc.bInterfaceNumber); | 1672 | intf->cur_altsetting->desc.bInterfaceNumber); |
1673 | 1673 | ||
1674 | if (intf->cur_altsetting->desc.bInterfaceSubClass == SC_VIDEOCONTROL) { | 1674 | if (intf->cur_altsetting->desc.bInterfaceSubClass == SC_VIDEOCONTROL) { |
1675 | if ((ret = uvc_ctrl_resume_device(dev)) < 0) | 1675 | if (reset && (ret = uvc_ctrl_resume_device(dev)) < 0) |
1676 | return ret; | 1676 | return ret; |
1677 | 1677 | ||
1678 | return uvc_status_resume(dev); | 1678 | return uvc_status_resume(dev); |
@@ -1687,6 +1687,16 @@ static int uvc_resume(struct usb_interface *intf) | |||
1687 | return uvc_video_resume(&dev->video); | 1687 | return uvc_video_resume(&dev->video); |
1688 | } | 1688 | } |
1689 | 1689 | ||
1690 | static int uvc_resume(struct usb_interface *intf) | ||
1691 | { | ||
1692 | return __uvc_resume(intf, 0); | ||
1693 | } | ||
1694 | |||
1695 | static int uvc_reset_resume(struct usb_interface *intf) | ||
1696 | { | ||
1697 | return __uvc_resume(intf, 1); | ||
1698 | } | ||
1699 | |||
1690 | /* ------------------------------------------------------------------------ | 1700 | /* ------------------------------------------------------------------------ |
1691 | * Driver initialization and cleanup | 1701 | * Driver initialization and cleanup |
1692 | */ | 1702 | */ |
@@ -1952,6 +1962,7 @@ struct uvc_driver uvc_driver = { | |||
1952 | .disconnect = uvc_disconnect, | 1962 | .disconnect = uvc_disconnect, |
1953 | .suspend = uvc_suspend, | 1963 | .suspend = uvc_suspend, |
1954 | .resume = uvc_resume, | 1964 | .resume = uvc_resume, |
1965 | .reset_resume = uvc_reset_resume, | ||
1955 | .id_table = uvc_ids, | 1966 | .id_table = uvc_ids, |
1956 | .supports_autosuspend = 1, | 1967 | .supports_autosuspend = 1, |
1957 | }, | 1968 | }, |