All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Fuzzey <mfuzzey@gmail.com>
To: linux-media@vger.kernel.org
Subject: [PATCH] pwc : fix LED and power setup for first open
Date: Tue, 10 Mar 2009 00:16:00 +0100 (CET)	[thread overview]
Message-ID: <tkrat.98fa52cc2386a49f@gmail.com> (raw)

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);



                 reply	other threads:[~2009-03-09 23:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tkrat.98fa52cc2386a49f@gmail.com \
    --to=mfuzzey@gmail.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.