[media] gscpa: Clear usb_err before calling sd methods from suspend/resume
authorHans de Goede <hdegoede@redhat.com>
Wed, 9 May 2012 15:11:12 +0000 (12:11 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 14 May 2012 12:31:19 +0000 (09:31 -0300)
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/gspca.c

index 2687e76b0fb8cf7d70e59425020bb4bc9dd9d00f..d9df30917374e9aea4dc93292516b34be0b236f1 100644 (file)
@@ -2392,6 +2392,7 @@ int gspca_suspend(struct usb_interface *intf, pm_message_t message)
                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);
@@ -2411,6 +2412,7 @@ int gspca_resume(struct usb_interface *intf)
 
        mutex_lock(&gspca_dev->usb_lock);
        gspca_dev->frozen = 0;
+       gspca_dev->usb_err = 0;
        gspca_dev->sd_desc->init(gspca_dev);
        gspca_input_create_urb(gspca_dev);
        /*