From patchwork Sat Sep 15 20:14:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10601585 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E3F2A15E8 for ; Sat, 15 Sep 2018 20:14:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4E0E2A601 for ; Sat, 15 Sep 2018 20:14:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9BA02A99E; Sat, 15 Sep 2018 20:14:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F6842A601 for ; Sat, 15 Sep 2018 20:14:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728048AbeIPBew (ORCPT ); Sat, 15 Sep 2018 21:34:52 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:43390 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727774AbeIPBer (ORCPT ); Sat, 15 Sep 2018 21:34:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Sender:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MEFuc3ULSVLK3wDg/MeCCSBEZBGQOfd149HIbZ3qQmA=; b=E9pUvcByJ30ueLNe+dmIbQEpf 3b5plZnQ1IhNjjd9F41E82IFYuzEA0wJNuCHt0WDYw3zm3IstpKE4wGxD0JCY0S1Ge6dU0oL+mT6K 4FCF27m+BJviIZaArSO2hs3wZcn4LqUrmeV7/awNVyZfkCLi0+tU5fh4ZlJqFsoZ2jPYz7hmT+MvE 33RfAEsnhM98qjn07zXy0/cUe2rIYyssh6OLoM1dTqy3yjUk9i6ZTaFsAzSdzKkNgTkQlNYX71CPk 4HutBCaVMera8SK0e2Z0rpUdU5M7SJOGzft3dKUPVcu3FTi75VIOjpkY8iY5/+pOzGDweEY56Pgh+ pcXQCn3RQ==; Received: from [179.95.0.169] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1g1Gxe-0002P7-KD; Sat, 15 Sep 2018 20:14:35 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.91) (envelope-from ) id 1g1Gxc-0008SP-2z; Sat, 15 Sep 2018 17:14:32 -0300 From: Mauro Carvalho Chehab To: Linux Media Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , Hans Verkuil , Kees Cook , Bhumika Goyal Subject: [PATCH v2 12/14] media: saa7134: declare its own pads Date: Sat, 15 Sep 2018 17:14:27 -0300 Message-Id: <0170e70a57ac61e21700e828b0768ec9e5342c29.1537042262.git.mchehab+samsung@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As we don't need anymore to share pad numbers with similar drivers, use its own pad definition instead of a global model. Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/pci/saa7134/saa7134-core.c | 10 +++++----- drivers/media/pci/saa7134/saa7134.h | 8 +++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/media/pci/saa7134/saa7134-core.c b/drivers/media/pci/saa7134/saa7134-core.c index c4e2df197bf9..8984b1bf57a5 100644 --- a/drivers/media/pci/saa7134/saa7134-core.c +++ b/drivers/media/pci/saa7134/saa7134-core.c @@ -845,13 +845,13 @@ static void saa7134_create_entities(struct saa7134_dev *dev) */ if (!decoder) { dev->demod.name = "saa713x"; - dev->demod_pad[DEMOD_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK; - dev->demod_pad[DEMOD_PAD_IF_INPUT].sig_type = PAD_SIGNAL_ANALOG; - dev->demod_pad[DEMOD_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE; - dev->demod_pad[DEMOD_PAD_VID_OUT].sig_type = PAD_SIGNAL_DV; + dev->demod_pad[SAA7134_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK; + dev->demod_pad[SAA7134_PAD_IF_INPUT].sig_type = PAD_SIGNAL_ANALOG; + dev->demod_pad[SAA7134_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE; + dev->demod_pad[SAA7134_PAD_VID_OUT].sig_type = PAD_SIGNAL_DV; dev->demod.function = MEDIA_ENT_F_ATV_DECODER; - ret = media_entity_pads_init(&dev->demod, DEMOD_NUM_PADS, + ret = media_entity_pads_init(&dev->demod, SAA7134_NUM_PADS, dev->demod_pad); if (ret < 0) pr_err("failed to initialize demod pad!\n"); diff --git a/drivers/media/pci/saa7134/saa7134.h b/drivers/media/pci/saa7134/saa7134.h index d99e937a98c1..ac05a38aa728 100644 --- a/drivers/media/pci/saa7134/saa7134.h +++ b/drivers/media/pci/saa7134/saa7134.h @@ -547,6 +547,12 @@ struct saa7134_mpeg_ops { unsigned long status); }; +enum saa7134_pads { + SAA7134_PAD_IF_INPUT, + SAA7134_PAD_VID_OUT, + SAA7134_NUM_PADS +}; + /* global device status */ struct saa7134_dev { struct list_head devlist; @@ -674,7 +680,7 @@ struct saa7134_dev { struct media_pad input_pad[SAA7134_INPUT_MAX + 1]; struct media_entity demod; - struct media_pad demod_pad[DEMOD_NUM_PADS]; + struct media_pad demod_pad[SAA7134_NUM_PADS]; struct media_pad video_pad, vbi_pad; struct media_entity *decoder;