aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2012-05-09 11:11:12 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-14 08:31:19 -0400
commit9a190c858cacd4b0110fefda5046ade8cd726261 (patch)
tree42dcf58dd0aff2d9dc3b3b3a4b53009d37630d57
parenta3d6e8cc0e6ddc8b3cfdeb3c979f07ed1aa528b3 (diff)
[media] gscpa: Clear usb_err before calling sd methods from suspend/resume
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/gspca/gspca.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 2687e76b0fb8..d9df30917374 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -2392,6 +2392,7 @@ int gspca_suspend(struct usb_interface *intf, pm_message_t message)
2392 return 0; 2392 return 0;
2393 mutex_lock(&gspca_dev->usb_lock); 2393 mutex_lock(&gspca_dev->usb_lock);
2394 gspca_dev->frozen = 1; /* avoid urb error messages */ 2394 gspca_dev->frozen = 1; /* avoid urb error messages */
2395 gspca_dev->usb_err = 0;
2395 if (gspca_dev->sd_desc->stopN) 2396 if (gspca_dev->sd_desc->stopN)
2396 gspca_dev->sd_desc->stopN(gspca_dev); 2397 gspca_dev->sd_desc->stopN(gspca_dev);
2397 destroy_urbs(gspca_dev); 2398 destroy_urbs(gspca_dev);
@@ -2411,6 +2412,7 @@ int gspca_resume(struct usb_interface *intf)
2411 2412
2412 mutex_lock(&gspca_dev->usb_lock); 2413 mutex_lock(&gspca_dev->usb_lock);
2413 gspca_dev->frozen = 0; 2414 gspca_dev->frozen = 0;
2415 gspca_dev->usb_err = 0;
2414 gspca_dev->sd_desc->init(gspca_dev); 2416 gspca_dev->sd_desc->init(gspca_dev);
2415 gspca_input_create_urb(gspca_dev); 2417 gspca_input_create_urb(gspca_dev);
2416 /* 2418 /*