aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca
diff options
context:
space:
mode:
authorErik Andrén <erik.andren@gmail.com>2009-06-23 11:22:48 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-07-24 13:03:21 -0400
commit36a516d953e02523e78ce27fbff91a968a9e5751 (patch)
tree85ffcca38a9492d144068e008f4d622a608bfe5e /drivers/media/video/gspca
parent4be3bd7849165e7efa6b0b35a23d6a3598d97465 (diff)
V4L/DVB (12221): gspca - stv06xx-hdcs: Actually update the sensor state
Signed-off-by: Erik Andrén <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca')
-rw-r--r--drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
index 3039ec208f3a..ec7f5536a8ad 100644
--- a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
+++ b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c
@@ -174,7 +174,9 @@ static int hdcs_set_state(struct sd *sd, enum hdcs_power_state state)
174 } 174 }
175 175
176 ret = stv06xx_write_sensor(sd, HDCS_REG_CONTROL(sd), val); 176 ret = stv06xx_write_sensor(sd, HDCS_REG_CONTROL(sd), val);
177 if (ret < 0) 177
178 /* Update the state if the write succeeded */
179 if (!ret)
178 hdcs->state = state; 180 hdcs->state = state;
179 181
180 return ret; 182 return ret;