From cf0a7bdbf6942682ab0dc4abb73a48a6a1038976 Mon Sep 17 00:00:00 2001 From: "Leonid V. Fedorenchik" Date: Fri, 16 Sep 2011 14:14:47 +0800 Subject: [PATCH] --- yaml --- r: 268438 b: refs/heads/master c: 9eadb1711cd76710efd89b4b801e2180b2938d5f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/staging/cx25821/cx25821-video.c | 26 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index f299601c5e99..a2d921d721ea 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fb5f2c8010b5cd81e8114dc8a3f853cee5fc4c1c +refs/heads/master: 9eadb1711cd76710efd89b4b801e2180b2938d5f diff --git a/trunk/drivers/staging/cx25821/cx25821-video.c b/trunk/drivers/staging/cx25821/cx25821-video.c index 268f51b93ec6..61fa7aff80d8 100644 --- a/trunk/drivers/staging/cx25821/cx25821-video.c +++ b/trunk/drivers/staging/cx25821/cx25821-video.c @@ -810,25 +810,25 @@ static int video_open(struct file *file) mutex_lock(&cx25821_devlist_mutex); - list_for_each(list, &cx25821_devlist) - { - h = list_entry(list, struct cx25821_dev, devlist); + list_for_each(list, &cx25821_devlist) + { + h = list_entry(list, struct cx25821_dev, devlist); - for (i = 0; i < MAX_VID_CHANNEL_NUM; i++) { - if (h->channels[i].video_dev && + for (i = 0; i < MAX_VID_CHANNEL_NUM; i++) { + if (h->channels[i].video_dev && h->channels[i].video_dev->minor == minor) { - dev = h; - ch_id = i; - type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - } - } - } + dev = h; + ch_id = i; + type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + } + } + } - if (NULL == dev) { + if (NULL == dev) { mutex_unlock(&cx25821_devlist_mutex); kfree(fh); return -ENODEV; - } + } file->private_data = fh; fh->dev = dev;