Skip to content

Commit

Permalink
[media] pwc: Also set alt setting to alt0 when no error occured
Browse files Browse the repository at this point in the history
isoc_cleanup contains a check to not set the altsetting to alt0 when
the device was unplugged, but the check currently is buggy, and causes
the alt setting to only be set to 0 if an error occured while streaming.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Dec 29, 2010
1 parent 3751e28 commit c7d1886
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/pwc/pwc-if.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ void pwc_isoc_cleanup(struct pwc_device *pdev)
/* Stop camera, but only if we are sure the camera is still there (unplug
is signalled by EPIPE)
*/
if (pdev->error_status && pdev->error_status != EPIPE) {
if (pdev->error_status != EPIPE) {
PWC_DEBUG_OPEN("Setting alternate interface 0.\n");
usb_set_interface(pdev->udev, 0, 0);
}
Expand Down

0 comments on commit c7d1886

Please sign in to comment.