From patchwork Tue Apr 17 16:39:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brad Love X-Patchwork-Id: 10345929 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 72F5E60216 for ; Tue, 17 Apr 2018 16:40:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5FF352852A for ; Tue, 17 Apr 2018 16:40:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E7BD2858A; Tue, 17 Apr 2018 16:40: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.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 08DE428567 for ; Tue, 17 Apr 2018 16:40:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755302AbeDQQkZ (ORCPT ); Tue, 17 Apr 2018 12:40:25 -0400 Received: from sub5.mail.dreamhost.com ([208.113.200.129]:51048 "EHLO homiemail-a48.g.dreamhost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753775AbeDQQkY (ORCPT ); Tue, 17 Apr 2018 12:40:24 -0400 Received: from homiemail-a48.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a48.g.dreamhost.com (Postfix) with ESMTP id 2E77770A0D0C; Tue, 17 Apr 2018 09:40:24 -0700 (PDT) Received: from localhost.localdomain (66-90-189-166.dyn.grandenetworks.net [66.90.189.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: brad@nextdimension.ws) by homiemail-a48.g.dreamhost.com (Postfix) with ESMTPSA id D1C7870A0D0F; Tue, 17 Apr 2018 09:40:23 -0700 (PDT) From: Brad Love To: linux-media@vger.kernel.org, mchehab@s-opensource.com Cc: Brad Love Subject: [PATCH 2/9] cx231xx: Use board profile values for addresses Date: Tue, 17 Apr 2018 11:39:48 -0500 Message-Id: <1523983195-28691-3-git-send-email-brad@nextdimension.cc> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523983195-28691-1-git-send-email-brad@nextdimension.cc> References: <1523983195-28691-1-git-send-email-brad@nextdimension.cc> 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 Replace all usage of hard coded values with the proper field from the board profile. Signed-off-by: Brad Love --- drivers/media/usb/cx231xx/cx231xx-dvb.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c index 67ed667..99f1a77 100644 --- a/drivers/media/usb/cx231xx/cx231xx-dvb.c +++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c @@ -728,7 +728,7 @@ static int dvb_init(struct cx231xx *dev) dvb->frontend[0]->callback = cx231xx_tuner_callback; if (!dvb_attach(tda18271_attach, dev->dvb->frontend[0], - 0x60, tuner_i2c, + dev->board.tuner_addr, tuner_i2c, &cnxt_rde253s_tunerconfig)) { result = -EINVAL; goto out_free; @@ -752,7 +752,7 @@ static int dvb_init(struct cx231xx *dev) dvb->frontend[0]->callback = cx231xx_tuner_callback; if (!dvb_attach(tda18271_attach, dev->dvb->frontend[0], - 0x60, tuner_i2c, + dev->board.tuner_addr, tuner_i2c, &cnxt_rde253s_tunerconfig)) { result = -EINVAL; goto out_free; @@ -779,7 +779,7 @@ static int dvb_init(struct cx231xx *dev) dvb->frontend[0]->callback = cx231xx_tuner_callback; dvb_attach(tda18271_attach, dev->dvb->frontend[0], - 0x60, tuner_i2c, + dev->board.tuner_addr, tuner_i2c, &hcw_tda18271_config); break; @@ -797,7 +797,7 @@ static int dvb_init(struct cx231xx *dev) memset(&info, 0, sizeof(struct i2c_board_info)); strlcpy(info.type, "si2165", I2C_NAME_SIZE); - info.addr = 0x64; + info.addr = dev->board.demod_addr; info.platform_data = &si2165_pdata; request_module(info.type); client = i2c_new_device(demod_i2c, &info); @@ -822,8 +822,7 @@ static int dvb_init(struct cx231xx *dev) dvb->frontend[0]->callback = cx231xx_tuner_callback; dvb_attach(tda18271_attach, dev->dvb->frontend[0], - 0x60, - tuner_i2c, + dev->board.tuner_addr, tuner_i2c, &hcw_tda18271_config); dev->cx231xx_reset_analog_tuner = NULL; @@ -844,7 +843,7 @@ static int dvb_init(struct cx231xx *dev) memset(&info, 0, sizeof(struct i2c_board_info)); strlcpy(info.type, "si2165", I2C_NAME_SIZE); - info.addr = 0x64; + info.addr = dev->board.demod_addr; info.platform_data = &si2165_pdata; request_module(info.type); client = i2c_new_device(demod_i2c, &info); @@ -879,7 +878,7 @@ static int dvb_init(struct cx231xx *dev) si2157_config.if_port = 1; si2157_config.inversion = true; strlcpy(info.type, "si2157", I2C_NAME_SIZE); - info.addr = 0x60; + info.addr = dev->board.tuner_addr; info.platform_data = &si2157_config; request_module("si2157"); @@ -938,7 +937,7 @@ static int dvb_init(struct cx231xx *dev) si2157_config.if_port = 1; si2157_config.inversion = true; strlcpy(info.type, "si2157", I2C_NAME_SIZE); - info.addr = 0x60; + info.addr = dev->board.tuner_addr; info.platform_data = &si2157_config; request_module("si2157"); @@ -985,7 +984,7 @@ static int dvb_init(struct cx231xx *dev) dvb->frontend[0]->callback = cx231xx_tuner_callback; dvb_attach(tda18271_attach, dev->dvb->frontend[0], - 0x60, tuner_i2c, + dev->board.tuner_addr, tuner_i2c, &pv_tda18271_config); break;