Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330962
b: refs/heads/master
c: 36adfca
h: refs/heads/master
v: v3
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Sep 13, 2012
1 parent dcdfb8a commit 2957a71
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 844db450e6e2cf710752af1a019a877af390b541
refs/heads/master: 36adfca94a354b10b4e36684a45e830f6817b067
9 changes: 7 additions & 2 deletions trunk/drivers/media/usb/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -2391,19 +2391,22 @@ int gspca_suspend(struct usb_interface *intf, pm_message_t message)
{
struct gspca_dev *gspca_dev = usb_get_intfdata(intf);

gspca_input_destroy_urb(gspca_dev);

if (!gspca_dev->streaming)
return 0;

mutex_lock(&gspca_dev->usb_lock);
gspca_dev->frozen = 1; /* avoid urb error messages */
gspca_dev->usb_err = 0;
if (gspca_dev->sd_desc->stopN)
gspca_dev->sd_desc->stopN(gspca_dev);
destroy_urbs(gspca_dev);
gspca_input_destroy_urb(gspca_dev);
gspca_set_alt0(gspca_dev);
if (gspca_dev->sd_desc->stop0)
gspca_dev->sd_desc->stop0(gspca_dev);
mutex_unlock(&gspca_dev->usb_lock);

return 0;
}
EXPORT_SYMBOL(gspca_suspend);
Expand All @@ -2417,7 +2420,6 @@ int gspca_resume(struct usb_interface *intf)
gspca_dev->frozen = 0;
gspca_dev->usb_err = 0;
gspca_dev->sd_desc->init(gspca_dev);
gspca_input_create_urb(gspca_dev);
/*
* Most subdrivers send all ctrl values on sd_start and thus
* only write to the device registers on s_ctrl when streaming ->
Expand All @@ -2427,7 +2429,10 @@ int gspca_resume(struct usb_interface *intf)
gspca_dev->streaming = 0;
if (streaming)
ret = gspca_init_transfer(gspca_dev);
else
gspca_input_create_urb(gspca_dev);
mutex_unlock(&gspca_dev->usb_lock);

return ret;
}
EXPORT_SYMBOL(gspca_resume);
Expand Down

0 comments on commit 2957a71

Please sign in to comment.