From patchwork Wed Dec 21 15:30:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Jiang X-Patchwork-Id: 8927 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1RdCvz-0007Zl-Pu; Wed, 21 Dec 2011 04:33:40 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-4) with esmtp id 1RdCvz-0001h7-9s; Wed, 21 Dec 2011 04:33:39 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752146Ab1LUDdg (ORCPT + 3 others); Tue, 20 Dec 2011 22:33:36 -0500 Received: from db3ehsobe006.messaging.microsoft.com ([213.199.154.144]:4917 "EHLO DB3EHSOBE006.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751719Ab1LUDdg (ORCPT ); Tue, 20 Dec 2011 22:33:36 -0500 Received: from mail1-db3-R.bigfish.com (10.3.81.251) by DB3EHSOBE006.bigfish.com (10.3.84.26) with Microsoft SMTP Server id 14.1.225.23; Wed, 21 Dec 2011 03:33:26 +0000 Received: from mail1-db3 (localhost [127.0.0.1]) by mail1-db3-R.bigfish.com (Postfix) with ESMTP id A11E04800E1; Wed, 21 Dec 2011 03:33:55 +0000 (UTC) X-SpamScore: 1 X-BigFish: VS1(zzzz1202hzz8275bhz2ei87h2a8h668h839h) X-Forefront-Antispam-Report: CIP:137.71.25.55; KIP:(null); UIP:(null); IPV:NLI; H:nwd2mta1.analog.com; RD:nwd2mail10.analog.com; EFVD:NLI Received-SPF: neutral (mail1-db3: 137.71.25.55 is neither permitted nor denied by domain of gmail.com) client-ip=137.71.25.55; envelope-from=scott.jiang.linux@gmail.com; helo=nwd2mta1.analog.com ; 1.analog.com ; X-FB-DOMAIN-IP-MATCH: fail Received: from mail1-db3 (localhost.localdomain [127.0.0.1]) by mail1-db3 (MessageSwitch) id 1324438435568125_2455; Wed, 21 Dec 2011 03:33:55 +0000 (UTC) Received: from DB3EHSMHS001.bigfish.com (unknown [10.3.81.254]) by mail1-db3.bigfish.com (Postfix) with ESMTP id 84D13280042; Wed, 21 Dec 2011 03:33:55 +0000 (UTC) Received: from nwd2mta1.analog.com (137.71.25.55) by DB3EHSMHS001.bigfish.com (10.3.87.101) with Microsoft SMTP Server (TLS) id 14.1.225.23; Wed, 21 Dec 2011 03:33:25 +0000 Received: from NWD2HUBCAS1.ad.analog.com (nwd2hubcas1.ad.analog.com [10.64.73.29]) by nwd2mta1.analog.com (8.13.8/8.13.8) with ESMTP id pBL3Qrfh011204 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 20 Dec 2011 22:26:54 -0500 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS1.ad.analog.com (10.64.73.29) with Microsoft SMTP Server id 8.3.83.0; Tue, 20 Dec 2011 22:33:15 -0500 Received: from linux.site ([10.99.22.20]) by zeus.spd.analog.com (8.14.5/8.14.5) with ESMTP id pBL3XTmM006916; Tue, 20 Dec 2011 22:33:29 -0500 (EST) Received: from localhost.localdomain (unknown [10.99.24.72]) by linux.site (Postfix) with ESMTP id 368A4429B53A; Tue, 20 Dec 2011 12:52:30 -0700 (MST) From: Scott Jiang To: , Hans Verkuil , Laurent Pinchart , Mauro Carvalho Chehab , , CC: Scott Jiang Subject: [PATCH] v4l2: v4l2-fh: v4l2_fh_is_singular should use list head to test Date: Wed, 21 Dec 2011 10:30:54 -0500 Message-ID: <1324481454-30066-1-git-send-email-scott.jiang.linux@gmail.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.12.21.32116 X-PMX-Spam: Gauge=XIIIII, Probability=15%, Report=' DATE_IN_FUTURE_06_12 1.3, FORGED_FROM_GMAIL 0.1, MULTIPLE_RCPTS 0.1, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1000_1099 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, DATE_TZ_NEG_0500 0, __ANY_URI 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_TO_X5 0, __PHISH_SPEAR_STRUCTURE_1 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' X-LSpam-Score: 0.0 (/) list_is_singular accepts a list head to test whether a list has just one entry. fh->list is the entry, fh->vdev->fh_list is the list head. Signed-off-by: Scott Jiang Acked-by: Sakari Ailus --- drivers/media/video/v4l2-fh.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/video/v4l2-fh.c b/drivers/media/video/v4l2-fh.c index 9e3fc04..8292c4a 100644 --- a/drivers/media/video/v4l2-fh.c +++ b/drivers/media/video/v4l2-fh.c @@ -113,7 +113,7 @@ int v4l2_fh_is_singular(struct v4l2_fh *fh) if (fh == NULL || fh->vdev == NULL) return 0; spin_lock_irqsave(&fh->vdev->fh_lock, flags); - is_singular = list_is_singular(&fh->list); + is_singular = list_is_singular(&fh->vdev->fh_list); spin_unlock_irqrestore(&fh->vdev->fh_lock, flags); return is_singular; }