From patchwork Tue Sep 22 17:19:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 7250301 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7261E9F40A for ; Wed, 23 Sep 2015 14:41:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 843F920AD9 for ; Wed, 23 Sep 2015 14:41:53 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 5566720AC9 for ; Wed, 23 Sep 2015 14:41:52 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 799B1265E14; Wed, 23 Sep 2015 16:41:51 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 38B4D2654C9; Wed, 23 Sep 2015 16:33:55 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id CC419265163; Tue, 22 Sep 2015 19:20:25 +0200 (CEST) Received: from resqmta-po-11v.sys.comcast.net (resqmta-po-11v.sys.comcast.net [96.114.154.170]) by alsa0.perex.cz (Postfix) with ESMTP id 8731F265086 for ; Tue, 22 Sep 2015 19:19:54 +0200 (CEST) Received: from resomta-po-18v.sys.comcast.net ([96.114.154.242]) by resqmta-po-11v.sys.comcast.net with comcast id LHKZ1r0035E3ZMc01HKuol; Tue, 22 Sep 2015 17:19:54 +0000 Received: from mail.gonehiking.org ([73.181.52.62]) by resomta-po-18v.sys.comcast.net with comcast id LHKp1r00M1LXgTt01HKtSn; Tue, 22 Sep 2015 17:19:54 +0000 Received: from lorien.internal (lorien-wl.internal [192.168.1.40]) by mail.gonehiking.org (Postfix) with ESMTP id E3618A153E; Tue, 22 Sep 2015 11:19:52 -0600 (MDT) From: Shuah Khan To: mchehab@osg.samsung.com, hans.verkuil@cisco.com, laurent.pinchart@ideasonboard.com, sakari.ailus@linux.intel.com, tiwai@suse.de, pawel@osciak.com, m.szyprowski@samsung.com, kyungmin.park@samsung.com, perex@perex.cz, stefanr@s5r6.in-berlin.de, crope@iki.fi, dan.carpenter@oracle.com, tskd08@gmail.com, ruchandani.tina@gmail.com, arnd@arndb.de, chehabrafael@gmail.com, prabhakar.csengg@gmail.com, Julia.Lawall@lip6.fr, elfring@users.sourceforge.net, ricardo.ribalda@gmail.com, chris.j.arges@canonical.com, pierre-louis.bossart@linux.intel.com, gtmkramer@xs4all.nl, clemens@ladisch.de, misterpib@gmail.com, takamichiho@gmail.com, pmatilai@laiskiainen.org, damien@zamaudio.com, daniel@zonque.org, vladcatoi@gmail.com, normalperson@yhbt.net, joe@oampo.co.uk, bugzilla.frnkcg@spamgourmet.com, jussi@sonarnerd.net Date: Tue, 22 Sep 2015 11:19:31 -0600 Message-Id: <9a717e8f411fc1a1bac2c984f154ada401a9186c.1442937669.git.shuahkh@osg.samsung.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1442942394; bh=PwT2yKDM0gkYZlS4DGTfRnVtgcv8AMxESgSCrJLLToE=; h=Received:Received:Received:From:To:Subject:Date:Message-Id; b=slng3YvZWKh6uh5JNsQg+yvRdaxEFMEER5UUXRm+OzAtF2JxgjvHQsyFYK9cgQuhv wK7F8V+T5u7TnkITyUW2ikWd0XbOIsHZUqq+5yG+4DI/THLMOvav0sWkeWq4x1bR50 bapkD1z3vOeEHmAjd8zOAYWm3HA3EDS0783fxa3l7wxfYaHs/SQ3wfnHozEVFxfrBj NtH+cqEYVVUf3X+/eqyIfBvvM61VAdoemayJgO31Y8JH7wZQtV1iIpVw9o5KfcIlw/ 875hfLhlYZBYew5+HXXKJ+4cD6bfP+W0C689utgCkm7FDjOKASWyI2qQUzo1XX653S JF+sL9WAf4uvA== X-Mailman-Approved-At: Wed, 23 Sep 2015 16:33:44 +0200 Cc: alsa-devel@alsa-project.org, Shuah Khan , linux-media@vger.kernel.org Subject: [alsa-devel] [PATCH v3 12/21] media: au0828 fix au0828_create_media_graph() entity checks X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP au0828_create_media_graph() checks if entity.links is null or not to determine, if vbi_dev and vdev entities have been registered. Checking entity.parent field is right way, as parent field gets initialized when entity is registered. Fix it to check entity.parent field. Signed-off-by: Shuah Khan --- drivers/media/usb/au0828/au0828-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c index 276598b..0b8dc49 100644 --- a/drivers/media/usb/au0828/au0828-core.c +++ b/drivers/media/usb/au0828/au0828-core.c @@ -263,11 +263,11 @@ static void au0828_create_media_graph(struct au0828_dev *dev) if (tuner) media_entity_create_link(tuner, 0, decoder, 0, MEDIA_LNK_FL_ENABLED); - if (dev->vdev.entity.links) + if (dev->vdev.entity.parent) media_entity_create_link(decoder, AU8522_PAD_VID_OUT, &dev->vdev.entity, 0, MEDIA_LNK_FL_ENABLED); - if (dev->vbi_dev.entity.links) + if (dev->vbi_dev.entity.parent) media_entity_create_link(decoder, AU8522_PAD_VBI_OUT, &dev->vbi_dev.entity, 0, MEDIA_LNK_FL_ENABLED);