summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-03-09 23:16:00 +0000
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-09 23:16:00 +0000
commitb787d6928f6fd204f12cdb534178682662ae8fc2 (patch)
treea5347ce23fe038f2a528b8ede8324fefc09b33ab /linux/drivers
parentcc21a58533c17e0392f27c1ade56ec09d2e037b3 (diff)
downloadmediapointer-dvb-s2-b787d6928f6fd204f12cdb534178682662ae8fc2.tar.gz
mediapointer-dvb-s2-b787d6928f6fd204f12cdb534178682662ae8fc2.tar.bz2
pwc : fix LED and power setup for first open
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> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/video/pwc/pwc-if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/video/pwc/pwc-if.c b/linux/drivers/media/video/pwc/pwc-if.c
index 49a918636..b3765e280 100644
--- a/linux/drivers/media/video/pwc/pwc-if.c
+++ b/linux/drivers/media/video/pwc/pwc-if.c
@@ -1133,6 +1133,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;
@@ -1157,7 +1158,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);