From patchwork Wed Aug 1 15:55:09 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: 10552591 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 E1696174A for ; Wed, 1 Aug 2018 15:55:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D17DC2A163 for ; Wed, 1 Aug 2018 15:55:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C60AC2A262; Wed, 1 Aug 2018 15:55:31 +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 70D572A163 for ; Wed, 1 Aug 2018 15:55:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389992AbeHARlv (ORCPT ); Wed, 1 Aug 2018 13:41:51 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:56468 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389825AbeHARln (ORCPT ); Wed, 1 Aug 2018 13:41:43 -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=OXqwyspzdjOfae+DxMnQo8Kd/JBfx3SUldNHp9RxrR4=; b=O3uT5ZnASjJCjvLmOpdZeR2gH n46VqnX9HJe/+3GSi+sVSMk4cXv4ouvmObZKm3NUbem4b0slzxQcewV2lFosiZzD4qbCsKsAJq1r5 yAt8BO92UtONhvBMlDPKfbzuObcs8vtDmy2SYKB5pvseL5qoRKI12EfyuFpZPlndEmUdUtdXtoWCB V5rRAsxvs8C80Wzpa+oHyRZx6GDThQkKK2lAPOU/WVGvGzm36oR5plzYDUgZa65nKPf7c+My+drJU g0qDcqTrYMR8Cnhy8LHQF0w4EntxpL1bPlvtm+WdpcX9Q0P1VNmR7Y8p/lBX9ZGl5vFXi59uS8knF 5CBekSKqg==; Received: from [179.182.165.210] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fktT7-0005nz-Ex; Wed, 01 Aug 2018 15:55:21 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.91) (envelope-from ) id 1fktT5-0003wl-9B; Wed, 01 Aug 2018 12:55:19 -0300 From: Mauro Carvalho Chehab To: Linux Media Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , Thomas Gleixner , Kate Stewart , Philippe Ombredanne , Greg Kroah-Hartman Subject: [PATCH 07/13] media: msp3400: declare its own pads Date: Wed, 1 Aug 2018 12:55:09 -0300 Message-Id: <8839fb63e761749123fc20d43875f1484c7c4346.1533138685.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. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/msp3400-driver.c | 8 ++++---- drivers/media/i2c/msp3400-driver.h | 8 +++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/msp3400-driver.c b/drivers/media/i2c/msp3400-driver.c index 3b9c729fbd52..ef70fe0c77a1 100644 --- a/drivers/media/i2c/msp3400-driver.c +++ b/drivers/media/i2c/msp3400-driver.c @@ -703,10 +703,10 @@ static int msp_probe(struct i2c_client *client, const struct i2c_device_id *id) v4l2_i2c_subdev_init(sd, client, &msp_ops); #if defined(CONFIG_MEDIA_CONTROLLER) - state->pads[IF_AUD_DEC_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK; - state->pads[IF_AUD_DEC_PAD_IF_INPUT].sig_type = PAD_SIGNAL_AUDIO; - state->pads[IF_AUD_DEC_PAD_OUT].flags = MEDIA_PAD_FL_SOURCE; - state->pads[IF_AUD_DEC_PAD_OUT].sig_type = PAD_SIGNAL_AUDIO; + state->pads[MSP3400_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK; + state->pads[MSP3400_PAD_IF_INPUT].sig_type = PAD_SIGNAL_AUDIO; + state->pads[MSP3400_PAD_OUT].flags = MEDIA_PAD_FL_SOURCE; + state->pads[MSP3400_PAD_OUT].sig_type = PAD_SIGNAL_AUDIO; sd->entity.function = MEDIA_ENT_F_IF_AUD_DECODER; diff --git a/drivers/media/i2c/msp3400-driver.h b/drivers/media/i2c/msp3400-driver.h index b6c7698bce5a..2bb9d5ff1bbd 100644 --- a/drivers/media/i2c/msp3400-driver.h +++ b/drivers/media/i2c/msp3400-driver.h @@ -52,6 +52,12 @@ extern int msp_standard; extern bool msp_dolby; extern int msp_stereo_thresh; +enum msp3400_pads { + MSP3400_PAD_IF_INPUT, + MSP3400_PAD_OUT, + MSP3400_NUM_PADS +}; + struct msp_state { struct v4l2_subdev sd; struct v4l2_ctrl_handler hdl; @@ -106,7 +112,7 @@ struct msp_state { unsigned int watch_stereo:1; #if IS_ENABLED(CONFIG_MEDIA_CONTROLLER) - struct media_pad pads[IF_AUD_DEC_PAD_NUM_PADS]; + struct media_pad pads[MSP3400_NUM_PADS]; #endif };