gspca_cpia1: Restore QX3 illuminators' state on resume

Turn the lights of the QX3 on (or off) as needed when resuming and at module
load.

Signed-off-by: Andy Walls <awa...@md.metrocast.net>

diff -r 32d5c323c541 -r c2e7fb2d768e linux/drivers/media/video/gspca/cpia1.c
--- a/linux/drivers/media/video/gspca/cpia1.c   Sat Sep 11 21:15:03 2010 -0400
+++ b/linux/drivers/media/video/gspca/cpia1.c   Sat Sep 11 21:32:35 2010 -0400
@@ -1772,6 +1772,10 @@
        if (ret)
                return ret;
 
+       /* Ensure the QX3 illuminators' states are restored upon resume */
+       if (sd->params.qx3.qx3_detected)
+               command_setlights(gspca_dev);
+
        sd_stopN(gspca_dev);
 
        if (!sd->params.qx3.qx3_detected)



--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to