summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pwc
diff options
context:
space:
mode:
authorMartin Fuzzey <mfuzzey@gmail.com>2009-03-09 20:16:00 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 12:43:18 -0300
commit5c8e2403ba06d39f04f6ae62f3afe5542e0eb533 (patch)
tree5c07753899845ff5d0420363dd6eb2778ed3a776 /drivers/media/video/pwc
parent76ecf4599e55fd16bdb333a737c6243105c916e6 (diff)
downloadlinux-5c8e2403ba06d39f04f6ae62f3afe5542e0eb533.tar.gz
linux-5c8e2403ba06d39f04f6ae62f3afe5542e0eb533.tar.bz2
linux-5c8e2403ba06d39f04f6ae62f3afe5542e0eb533.zip
V4L/DVB (10945): pwc : fix LED and power setup for first open
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 'drivers/media/video/pwc')
-rw-r--r--drivers/media/video/pwc/pwc-if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index a7c2e7284c20..7c542caf248e 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -1125,6 +1125,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;
@@ -1149,7 +1150,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);