summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorArvydas Sidorenko <asido4@gmail.com>2011-09-13 07:18:10 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-18 08:11:28 -0300
commit47a7e6f8d282d199f14abbb068c6c3ba00cb7bfc (patch)
treef951278f2ff25d15f2dcb48bbfcfe3f78a16ec58 /drivers/media
parente27412f5a5966629e3d4213c78a539068ca0ea26 (diff)
[media] drivers/media/video/stk-webcam.c: webcam LED bug fix
The probem was on my DC-1125 webcam chip from Syntek. Whenever the webcam turns on, the LED light on it is turn on also and never turns off again unless system is shut downed or restarted. This patch will fix this issue - the LED will be turned off whenever the device is released. Signed-off-by: Arvydas Sidorenko <asido4@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/stk-webcam.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c
index d1a2cefbf55..859e78fc1aa 100644
--- a/drivers/media/video/stk-webcam.c
+++ b/drivers/media/video/stk-webcam.c
@@ -574,6 +574,8 @@ static int v4l_stk_release(struct file *fp)
if (dev->owner == fp) {
stk_stop_stream(dev);
stk_free_buffers(dev);
+ stk_camera_write_reg(dev, 0x0, 0x48); /* turn off the LED */
+ unset_initialised(dev);
dev->owner = NULL;
}