linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pwc : fix LED and power setup for first open
@ 2009-03-09 23:16 Martin Fuzzey
  0 siblings, 0 replies; only message in thread
From: Martin Fuzzey @ 2009-03-09 23:16 UTC (permalink / raw)
  To: linux-media

From: Martin Fuzzey <mfuzzey@gmail.com>

Call pwc_construct before trying to talk to device to obtain vc interface so
that LED and power setup works the first time the video device is opened.

Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com>

---

diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index 0d81018..e11f422 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -1115,6 +1115,7 @@ static int pwc_video_open(struct file *file)
 	}

 	mutex_lock(&pdev->modlock);
+	pwc_construct(pdev); /* set min/max sizes correct */
 	if (!pdev->usb_init) {
 		PWC_DEBUG_OPEN("Doing first time initialization.\n");
 		pdev->usb_init = 1;
@@ -1139,7 +1140,6 @@ static int pwc_video_open(struct file *file)
 	if (pwc_set_leds(pdev, led_on, led_off) < 0)
 		PWC_DEBUG_OPEN("Failed to set LED on/off time.\n");

-	pwc_construct(pdev); /* set min/max sizes correct */

 	/* So far, so good. Allocate memory. */
 	i = pwc_allocate_buffers(pdev);



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-09 23:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-09 23:16 [PATCH] pwc : fix LED and power setup for first open Martin Fuzzey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).