From patchwork Sat Sep 15 20:14:24 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: 10601587 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 0A2281750 for ; Sat, 15 Sep 2018 20:14:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED0DE294C7 for ; Sat, 15 Sep 2018 20:14:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E1DAA2A9D4; 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 8F8DB2A62E for ; Sat, 15 Sep 2018 20:14:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728046AbeIPBew (ORCPT ); Sat, 15 Sep 2018 21:34:52 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:43402 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727852AbeIPBer (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=7TfptekRRunVWIxSt8Y7f50sgqFzBbv6/39Jp+EX3Ws=; b=XcQ7AWnfUkMmW3FxMICtJBfRb rVyvuWfXRnLDBIkf+u+GXxmkluchtOkd9AqCS9VrSc22QSAS0EDhHaaOord7nIxky+eVd0FdLrWfl /OBTKRLR9OgMrNCvOCLb1t/nlYgEnogThMRyYo1tQnqQuSWH7pc+9qllN1eUqoznbvRR0MO9MahBl F3+x1Jvg6CjnRrxvH2W+wySk8cf2gi8W/xwI6Xt13lHHlTeNVaOYni+Yji6XS7fyurAKqmgGUUftm 6/T+Mb2aGbDR8K1/aM6gu/Bl7f13JjEWsCK3WGPtt3AFASzTDAjGAynGlKy6OOq0HrhQU4Ewwmzsu bH2lo9N/A==; 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-0002PB-L9; Sat, 15 Sep 2018 20:14:35 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.91) (envelope-from ) id 1g1Gxc-0008SD-0H; 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 , Sakari Ailus , Brian Warner Subject: [PATCH v2 09/14] media: saa7115: declare its own pads Date: Sat, 15 Sep 2018 17:14:24 -0300 Message-Id: <75d23f5b6cf851ffe2a1a64dbc9052e5b2552d50.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/i2c/saa7115.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/media/i2c/saa7115.c b/drivers/media/i2c/saa7115.c index 7b2dbe7c59b2..1b30f568119a 100644 --- a/drivers/media/i2c/saa7115.c +++ b/drivers/media/i2c/saa7115.c @@ -59,10 +59,17 @@ enum saa711x_model { SAA7118, }; + +enum saa711x_pads { + SAA711X_PAD_IF_INPUT, + SAA711X_PAD_VID_OUT, + SAA711X_NUM_PADS +}; + struct saa711x_state { struct v4l2_subdev sd; #ifdef CONFIG_MEDIA_CONTROLLER - struct media_pad pads[DEMOD_NUM_PADS]; + struct media_pad pads[SAA711X_NUM_PADS]; #endif struct v4l2_ctrl_handler hdl; @@ -1834,14 +1841,14 @@ static int saa711x_probe(struct i2c_client *client, v4l2_i2c_subdev_init(sd, client, &saa711x_ops); #if defined(CONFIG_MEDIA_CONTROLLER) - state->pads[DEMOD_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK; - state->pads[DEMOD_PAD_IF_INPUT].sig_type = PAD_SIGNAL_ANALOG; - state->pads[DEMOD_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE; - state->pads[DEMOD_PAD_VID_OUT].sig_type = PAD_SIGNAL_DV; + state->pads[SAA711X_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK; + state->pads[SAA711X_PAD_IF_INPUT].sig_type = PAD_SIGNAL_ANALOG; + state->pads[SAA711X_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE; + state->pads[SAA711X_PAD_VID_OUT].sig_type = PAD_SIGNAL_DV; sd->entity.function = MEDIA_ENT_F_ATV_DECODER; - ret = media_entity_pads_init(&sd->entity, DEMOD_NUM_PADS, state->pads); + ret = media_entity_pads_init(&sd->entity, SAA711X_NUM_PADS, state->pads); if (ret < 0) return ret; #endif