diff options
author | Erik Andrén <erik.andren@gmail.com> | 2009-06-23 17:22:48 +0200 |
---|---|---|
committer | Erik Andrén <erik.andren@gmail.com> | 2009-06-23 17:22:48 +0200 |
commit | 1da6ad98e478b29ad30ad485246a768225407d8b (patch) | |
tree | a14d9546c2d5a84de3590bdaec3bc2f01b80881f /linux/drivers/media | |
parent | 784f927dcf2cc497d4a2c44fb4f1321d9cf0c45b (diff) | |
download | mediapointer-dvb-s2-1da6ad98e478b29ad30ad485246a768225407d8b.tar.gz mediapointer-dvb-s2-1da6ad98e478b29ad30ad485246a768225407d8b.tar.bz2 |
gspca - stv06xx-hdcs: Actually update the sensor state
From: Erik Andrén <erik.andren@gmail.com>
Priority: high
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c b/linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c index 3039ec208..ec7f5536a 100644 --- a/linux/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c +++ b/linux/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) } ret = stv06xx_write_sensor(sd, HDCS_REG_CONTROL(sd), val); - if (ret < 0) + + /* Update the state if the write succeeded */ + if (!ret) hdcs->state = state; return ret; |