mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] drivers/media/video/stk-webcam.c: webcam LED bug fix
@ 2011-09-13 11:18 Arvydas Sidorenko
  2011-09-13 11:18 ` [PATCH 2/2] drivers/media/video/stk-webcam.c: coding style issue Arvydas Sidorenko
  0 siblings, 1 reply; 2+ messages in thread
From: Arvydas Sidorenko @ 2011-09-13 11:18 UTC (permalink / raw)
  To: mchehab; +Cc: asido4, hverkuil, arnd, linux-media, linux-kernel

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>
---
 drivers/media/video/stk-webcam.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/stk-webcam.c b/drivers/media/video/stk-webcam.c
index d1a2cef..859e78f 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;
 	}
 
-- 
1.7.4.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-09-13 11:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-13 11:18 [PATCH 1/2] drivers/media/video/stk-webcam.c: webcam LED bug fix Arvydas Sidorenko
2011-09-13 11:18 ` [PATCH 2/2] drivers/media/video/stk-webcam.c: coding style issue Arvydas Sidorenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®