[media] gspca: Add reset_resume callback to all sub-drivers
authorHans de Goede <hdegoede@redhat.com>
Sat, 30 Jun 2012 09:44:47 +0000 (06:44 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Jul 2012 21:39:22 +0000 (18:39 -0300)
1) The gspca-core's suspend/resume code is such that resume being called after
a reset is safe / ok.

2) All devices tested sofar seem to need the reset_resume callback to work
properly over a suspend

3) The USB-core won't call the reset_resume callback for devices which don't
need it

Thus it seems the simplest and the best to just add the callback to all
sub-drivers, rather then adding the callbacks one-by-one as each driver gets
tested with suspend/resume.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
41 files changed:
drivers/media/video/gspca/benq.c
drivers/media/video/gspca/conex.c
drivers/media/video/gspca/cpia1.c
drivers/media/video/gspca/etoms.c
drivers/media/video/gspca/finepix.c
drivers/media/video/gspca/gl860/gl860.c
drivers/media/video/gspca/jeilinj.c
drivers/media/video/gspca/jl2005bcd.c
drivers/media/video/gspca/kinect.c
drivers/media/video/gspca/konica.c
drivers/media/video/gspca/m5602/m5602_core.c
drivers/media/video/gspca/mr97310a.c
drivers/media/video/gspca/nw80x.c
drivers/media/video/gspca/ov519.c
drivers/media/video/gspca/ov534.c
drivers/media/video/gspca/ov534_9.c
drivers/media/video/gspca/pac207.c
drivers/media/video/gspca/pac7302.c
drivers/media/video/gspca/pac7311.c
drivers/media/video/gspca/se401.c
drivers/media/video/gspca/sn9c2028.c
drivers/media/video/gspca/sonixb.c
drivers/media/video/gspca/sonixj.c
drivers/media/video/gspca/spca1528.c
drivers/media/video/gspca/spca500.c
drivers/media/video/gspca/spca501.c
drivers/media/video/gspca/spca505.c
drivers/media/video/gspca/spca506.c
drivers/media/video/gspca/spca508.c
drivers/media/video/gspca/spca561.c
drivers/media/video/gspca/sq905.c
drivers/media/video/gspca/sq905c.c
drivers/media/video/gspca/sq930x.c
drivers/media/video/gspca/stk014.c
drivers/media/video/gspca/stv0680.c
drivers/media/video/gspca/sunplus.c
drivers/media/video/gspca/t613.c
drivers/media/video/gspca/tv8532.c
drivers/media/video/gspca/vc032x.c
drivers/media/video/gspca/vicam.c
drivers/media/video/gspca/xirlink_cit.c

index f033148..352f321 100644 (file)
@@ -282,6 +282,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index f06ba90..c9052f2 100644 (file)
@@ -959,6 +959,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 57cad7b..2499a88 100644 (file)
@@ -1898,6 +1898,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 8da77a8..38f68e1 100644 (file)
@@ -792,6 +792,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 6e26c93..c8f2201 100644 (file)
@@ -299,6 +299,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume  = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index c549574..ced3b71 100644 (file)
@@ -521,6 +521,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend    = gspca_suspend,
        .resume     = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 51016db..26b9931 100644 (file)
@@ -541,6 +541,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume  = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 9c591c7..cf9d9fc 100644 (file)
@@ -505,8 +505,6 @@ static void sd_stop0(struct gspca_dev *gspca_dev)
 /* sub-driver description */
 static const struct sd_desc sd_desc = {
        .name = MODULE_NAME,
-       /* .ctrls = none have been detected */
-       /* .nctrls = ARRAY_SIZE(sd_ctrls),  */
        .config = sd_config,
        .init = sd_init,
        .start = sd_start,
@@ -536,6 +534,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index f71ec0c..40ad668 100644 (file)
@@ -401,6 +401,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend    = gspca_suspend,
        .resume     = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 5dcfed2..46e1ae4 100644 (file)
@@ -472,6 +472,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 0c44936..ed22638 100644 (file)
@@ -400,6 +400,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
        .disconnect = m5602_disconnect
 };
index 3ede41b..8f4714d 100644 (file)
@@ -1084,6 +1084,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index b8ab612..44c9964 100644 (file)
@@ -2087,6 +2087,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 3ae5e35..bfc7cef 100644 (file)
@@ -4981,6 +4981,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 78d11dd..bb09d78 100644 (file)
@@ -1537,6 +1537,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend    = gspca_suspend,
        .resume     = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 0627487..e4c3c8f 100644 (file)
@@ -1493,6 +1493,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend    = gspca_suspend,
        .resume     = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index fa661c6..d236d17 100644 (file)
@@ -462,6 +462,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index f5133cf..4877f7a 100644 (file)
@@ -925,6 +925,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 115da16..ba3558d 100644 (file)
@@ -694,6 +694,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 0b019ad..a33cb78 100644 (file)
@@ -730,6 +730,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
        .pre_reset = sd_pre_reset,
        .post_reset = sd_post_reset,
index 478533c..516a17e 100644 (file)
@@ -734,6 +734,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index dfc7077..fd1f8d2 100644 (file)
@@ -1486,6 +1486,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index f38faa9..150b2df 100644 (file)
@@ -3199,6 +3199,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index fa2075a..14d6352 100644 (file)
@@ -437,6 +437,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 08fdedb..25cb68d 100644 (file)
@@ -983,6 +983,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 6d4debd..3b7f777 100644 (file)
@@ -2047,6 +2047,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index fea17a8..bc7d67c 100644 (file)
@@ -800,6 +800,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 7b54f63..969bb5a 100644 (file)
@@ -605,6 +605,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index da5345d..1286b41 100644 (file)
@@ -1533,6 +1533,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 00f4de7..7ea5e91 100644 (file)
@@ -922,6 +922,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 04f5465..a8ac979 100644 (file)
@@ -433,6 +433,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume  = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index f34ddb0..2c2f3d2 100644 (file)
@@ -340,6 +340,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume  = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 2d06886..3e1e486 100644 (file)
@@ -1165,6 +1165,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend    = gspca_suspend,
        .resume     = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index e83e683..8c09826 100644 (file)
@@ -439,6 +439,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 461ed64..4e4f86c 100644 (file)
@@ -352,6 +352,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index c73748b..9ccfcb1 100644 (file)
@@ -1078,6 +1078,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 5f5d569..01414ba 100644 (file)
@@ -1043,6 +1043,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index ef39981..8591324 100644 (file)
@@ -371,6 +371,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 54a6cf9..f21fd16 100644 (file)
@@ -3846,6 +3846,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index 35afbd0..b1a64b9 100644 (file)
@@ -358,6 +358,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume  = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };
 
index e074718..42d51da 100644 (file)
@@ -3135,6 +3135,7 @@ static struct usb_driver sd_driver = {
 #ifdef CONFIG_PM
        .suspend = gspca_suspend,
        .resume = gspca_resume,
+       .reset_resume = gspca_resume,
 #endif
 };