V4L/DVB: 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 <[email protected]>
Signed-off-by: Jean-François Moine <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
diff --git a/drivers/media/video/gspca/cpia1.c b/drivers/media/video/gspca/cpia1.c
index a9a4074..3dbc7a1 100644
--- a/drivers/media/video/gspca/cpia1.c
+++ b/drivers/media/video/gspca/cpia1.c
@@ -1756,6 +1756,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);
PDEBUG(D_PROBE, "CPIA Version: %d.%02d (%d.%d)",