From patchwork Tue Sep 22 17:19:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 7241691 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8919BBEEC1 for ; Tue, 22 Sep 2015 17:28:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AA930209CF for ; Tue, 22 Sep 2015 17:28:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 01898209EB for ; Tue, 22 Sep 2015 17:28:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758802AbbIVR2G (ORCPT ); Tue, 22 Sep 2015 13:28:06 -0400 Received: from resqmta-po-11v.sys.comcast.net ([96.114.154.170]:49591 "EHLO resqmta-po-11v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758366AbbIVR2E (ORCPT ); Tue, 22 Sep 2015 13:28:04 -0400 Received: from resomta-po-01v.sys.comcast.net ([96.114.154.225]) by resqmta-po-11v.sys.comcast.net with comcast id LHKp1r0044s37d401HKtoT; Tue, 22 Sep 2015 17:19:53 +0000 Received: from mail.gonehiking.org ([73.181.52.62]) by resomta-po-01v.sys.comcast.net with comcast id LHKm1r00G1LXgTt01HKsMi; Tue, 22 Sep 2015 17:19:53 +0000 Received: from lorien.internal (lorien-wl.internal [192.168.1.40]) by mail.gonehiking.org (Postfix) with ESMTP id 40ED3A1633; 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 Cc: Shuah Khan , linux-media@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH v3 11/21] media: au0828 Use au8522_media_pads enum for pad defines Date: Tue, 22 Sep 2015 11:19:30 -0600 Message-Id: <754f57fb0f42cc11d00ee3bbbc3df6c01d909463.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=1442942393; bh=wwYN3oCez5t03mpAndYFyHT7I4Wp9wNsPtr6p/TBIHA=; h=Received:Received:Received:From:To:Subject:Date:Message-Id; b=E982x7kF7FdBiG9z3iDU8J6VAxbohzdplXr3UoasN61DH7ZGoM092LiFQwaJYyNoY YmxrIdB7xyJrHpATjqbn8b+puU34brenlfzpiChBnIURZulyTVsuKxQHkhpZdcgbGO o29HUELfuFb2BPv9Dj+zohsw5ozn7LmjhxSddJ89WgXoJfzP7m4oXXO1irqYwXUrL4 jGsypzbd8e/cCAsts80VveqOhQDZw+x51K/U4m+5Nz8wMyHNSMOOHPddAHdgIJHO7t F55kTdvC9nC59BOOSGSSGFoC3YeWo5M+9l00/jRhKE6nNgfQDp0mXAfBKm17qPxWKl 7IHfbpbMTBp8A== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Change au0828-core to use au8522_media_pads enum defines instead of hard-coding the pad values when it creates media graph linking decode pads to other entities. Signed-off-by: Shuah Khan --- drivers/media/usb/au0828/au0828-core.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c index 0378a2c..276598b 100644 --- a/drivers/media/usb/au0828/au0828-core.c +++ b/drivers/media/usb/au0828/au0828-core.c @@ -20,6 +20,7 @@ */ #include "au0828.h" +#include "au8522.h" #include #include @@ -263,11 +264,13 @@ static void au0828_create_media_graph(struct au0828_dev *dev) media_entity_create_link(tuner, 0, decoder, 0, MEDIA_LNK_FL_ENABLED); if (dev->vdev.entity.links) - media_entity_create_link(decoder, 1, &dev->vdev.entity, 0, - MEDIA_LNK_FL_ENABLED); + media_entity_create_link(decoder, AU8522_PAD_VID_OUT, + &dev->vdev.entity, 0, + MEDIA_LNK_FL_ENABLED); if (dev->vbi_dev.entity.links) - media_entity_create_link(decoder, 2, &dev->vbi_dev.entity, 0, - MEDIA_LNK_FL_ENABLED); + media_entity_create_link(decoder, AU8522_PAD_VBI_OUT, + &dev->vbi_dev.entity, 0, + MEDIA_LNK_FL_ENABLED); #endif }