From patchwork Sat Sep 15 20:14:28 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: 10601577 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 29CC4188F for ; Sat, 15 Sep 2018 20:14:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1824B294C7 for ; Sat, 15 Sep 2018 20:14:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C7A72A9D4; Sat, 15 Sep 2018 20:14:42 +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 A67EC2A9CC for ; Sat, 15 Sep 2018 20:14:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727944AbeIPBes (ORCPT ); Sat, 15 Sep 2018 21:34:48 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:43372 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727691AbeIPBer (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=50ZPX2Xcz1jxZGO0tKGNAgHKBWu40cKXbSPy3ZkzEqM=; b=Cy5NuNY9eDGQJboJBecH16RKq dc/A2cxFQi+KHvxUaIJeOyaG4mrJT6zXxuCpdEyYB+lgm+ihopbb3fG4kJDGNmv31el8wchluF744 zU0gHWEBBD1mWpZWiT4FKyb4mxu5tky51VJ8Ep7BecfSt6dGAsOxDRI65K+diJmuYhDwAmrA0VgzS Uv2H8JunaPflOTqoNejUlTAi4qlx1QpSN6JOfFCFVnl96xjeQkRLLCY4gvEzsNJN1fknMeUDdjSz1 39fF6gLZRoJkxq1E+JIqYnokNLcDo6YzXwrutOtdC9iqvX4fwA412U/rd7vH7TGAzj+k9msaol6tR suNqpaD1Q==; 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-0002Oz-HX; Sat, 15 Sep 2018 20:14:35 +0000 Received: from mchehab by bombadil.infradead.org with local (Exim 4.91) (envelope-from ) id 1g1Gxc-0008ST-3q; Sat, 15 Sep 2018 17:14:32 -0300 From: Mauro Carvalho Chehab To: Linux Media Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , Michael Krufky Subject: [PATCH v2 13/14] media: mxl111sf: declare its own pads Date: Sat, 15 Sep 2018 17:14:28 -0300 Message-Id: <0410808322e1f6bbfdaebba5a53aa481a15a36c8.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/usb/dvb-usb-v2/mxl111sf.c | 10 +++++----- drivers/media/usb/dvb-usb-v2/mxl111sf.h | 8 +++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf.c b/drivers/media/usb/dvb-usb-v2/mxl111sf.c index ecd758388745..85cdf593a9ad 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf.c +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf.c @@ -892,13 +892,13 @@ static int mxl111sf_attach_tuner(struct dvb_usb_adapter *adap) #ifdef CONFIG_MEDIA_CONTROLLER_DVB state->tuner.function = MEDIA_ENT_F_TUNER; state->tuner.name = "mxl111sf tuner"; - state->tuner_pads[TUNER_PAD_RF_INPUT].flags = MEDIA_PAD_FL_SINK; - state->tuner_pads[TUNER_PAD_RF_INPUT].sig_type = PAD_SIGNAL_ANALOG; - state->tuner_pads[TUNER_PAD_OUTPUT].flags = MEDIA_PAD_FL_SOURCE; - state->tuner_pads[TUNER_PAD_OUTPUT].sig_type = PAD_SIGNAL_ANALOG; + state->tuner_pads[MXL111SF_PAD_RF_INPUT].flags = MEDIA_PAD_FL_SINK; + state->tuner_pads[MXL111SF_PAD_RF_INPUT].sig_type = PAD_SIGNAL_ANALOG; + state->tuner_pads[MXL111SF_PAD_OUTPUT].flags = MEDIA_PAD_FL_SOURCE; + state->tuner_pads[MXL111SF_PAD_OUTPUT].sig_type = PAD_SIGNAL_ANALOG; ret = media_entity_pads_init(&state->tuner, - TUNER_NUM_PADS, state->tuner_pads); + MXL111SF_NUM_PADS, state->tuner_pads); if (ret) return ret; diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf.h b/drivers/media/usb/dvb-usb-v2/mxl111sf.h index 22253d4908eb..ed98654ba7fd 100644 --- a/drivers/media/usb/dvb-usb-v2/mxl111sf.h +++ b/drivers/media/usb/dvb-usb-v2/mxl111sf.h @@ -52,6 +52,12 @@ struct mxl111sf_adap_state { int (*fe_sleep)(struct dvb_frontend *); }; +enum mxl111sf_pads { + MXL111SF_PAD_RF_INPUT, + MXL111SF_PAD_OUTPUT, + MXL111SF_NUM_PADS +}; + struct mxl111sf_state { struct dvb_usb_device *d; @@ -94,7 +100,7 @@ struct mxl111sf_state { struct mutex msg_lock; #ifdef CONFIG_MEDIA_CONTROLLER_DVB struct media_entity tuner; - struct media_pad tuner_pads[2]; + struct media_pad tuner_pads[MXL111SF_NUM_PADS]; #endif };