提交 5c8e2403 编写于 作者: M Martin Fuzzey 提交者: Mauro Carvalho Chehab

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: NMartin Fuzzey <mfuzzey@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 76ecf459
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册