From patchwork Sun Apr 22 16:06:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 10355695 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 BE8D76023A for ; Sun, 22 Apr 2018 16:07:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADF4A2894C for ; Sun, 22 Apr 2018 16:07:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A2E742897F; Sun, 22 Apr 2018 16:07:01 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, 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 4DB942894C for ; Sun, 22 Apr 2018 16:07:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753960AbeDVQG7 (ORCPT ); Sun, 22 Apr 2018 12:06:59 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:38502 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754090AbeDVQGz (ORCPT ); Sun, 22 Apr 2018 12:06:55 -0400 Received: by mail-wr0-f195.google.com with SMTP id h3-v6so34742703wrh.5 for ; Sun, 22 Apr 2018 09:06:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=+7n5NYRgxAoSg6C2DTE1jrTIaH66sVzXxYrbqNtc5Is=; b=WZskVW8lP1OyhFQo8dVQTcOLz+tjT1Rzk63zVfGopfBb7X7jSpdu+6Cokk+/BCBTup G64Za1ESOZKckOfLbB7/lLXnkuy7lrQ+J8JjE1unNcPSt0srvo8smEsC+FoetY2YaQht ew6rwgylHRWkOjiipFuy8+NoJtFk9b8cp9PdJFCIh93k4UhXcTAheNNnJQkNLKEWLd3i pRmMyoeuL63VI0txwORtto2/W4wN8uMa+J5225qXjPKh0OqyR37Bczdd6IlKNYusNB/f z2YvjmANw1oJiXvbAgv8vWPRjB4x7tUUnmMPVS/yEC6dWxL1yXqNLqQNDnhwuGRsx1hG TE3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=+7n5NYRgxAoSg6C2DTE1jrTIaH66sVzXxYrbqNtc5Is=; b=OFS1ybkezLy1049hdcrXQw95yrHAQ2jK/2/C9pWWf+JGyUH8BUaQm3ubDR+qrpyFfJ 7ryAIMRKRtZwcl8qGTAr96yTo37P081BZoq+cMR8pPhg0hlWsz0jkOpNIxaT6lfYWDNq zPDie8JBgzNBk8nu0/WQbyTVOrbX96OKUGHAWCDUA6TdcQXdMu+w1XUtSj4GN1E2k45p GrTzOivoCm0b0+6KRick8jpXxCme/Yl9Wf0pC0WHZPvdQkV3sMcKQqQqw6oswiN9Yegc YE90zdDXO3CPdyKKrqs4ArWRyfBwhtSwxegb61octou+qx/I58ya7YSXS8kVIOrnZGnv ClUw== X-Gm-Message-State: ALQs6tDfVwHtybaOyBl4Qw9mBFfwElquNeRwo7EbJ/enR6Bi3qoOURc9 Q4gZzXYbBN2SUNk8ADCZKCXhlg== X-Google-Smtp-Source: AB8JxZr7+bWi0DNHGj9bZ6LhuIQ9eQZn2+VCfFBy6FJo1KlY/WcHTi/FRFqfBKXalMfMN5JKcu8R4Q== X-Received: by 10.28.54.83 with SMTP id d80mr7523666wma.3.1524413214451; Sun, 22 Apr 2018 09:06:54 -0700 (PDT) Received: from dvbdev.wuest.de (ip-84-118-193-200.unity-media.net. [84.118.193.200]) by smtp.gmail.com with ESMTPSA id m7-v6sm9504856wrb.61.2018.04.22.09.06.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Apr 2018 09:06:53 -0700 (PDT) From: Daniel Scheller To: linux-media@vger.kernel.org, mchehab@kernel.org, mchehab@s-opensource.com Subject: [PATCH 1/2] [media] ngene: cleanup superfluous I2C adapter evaluation Date: Sun, 22 Apr 2018 18:06:51 +0200 Message-Id: <20180422160652.20173-1-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.16.1 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 From: Daniel Scheller Commit ee93340e98bc ("media: ngene: deduplicate I2C adapter evaluation") added a helper to evaluate the I2C adapter to be used for demod/tuner attachment based on the given ngene_channel, and that helper is used in many attach functions to initialise the i2c_adapter variable. However, for some reason in tuner_attach_stv6110() and demod_attach_stv0900(), the adapter evaluation wasn't removed as in all other functions. Fix (or finalize, even) the helper use by cleaning up the superfluous I2C adapter evaluation leftover in these two functions. Signed-off-by: Daniel Scheller --- drivers/media/pci/ngene/ngene-cards.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/media/pci/ngene/ngene-cards.c b/drivers/media/pci/ngene/ngene-cards.c index 65fc8f23ad86..caa5976055c4 100644 --- a/drivers/media/pci/ngene/ngene-cards.c +++ b/drivers/media/pci/ngene/ngene-cards.c @@ -137,11 +137,6 @@ static int tuner_attach_stv6110(struct ngene_channel *chan) chan->dev->card_info->tuner_config[chan->number]; const struct stv6110x_devctl *ctl; - if (chan->number < 2) - i2c = &chan->dev->channel[0].i2c_adapter; - else - i2c = &chan->dev->channel[1].i2c_adapter; - ctl = dvb_attach(stv6110x_attach, chan->fe, tunerconf, i2c); if (ctl == NULL) { dev_err(pdev, "No STV6110X found!\n"); @@ -304,14 +299,6 @@ static int demod_attach_stv0900(struct ngene_channel *chan) struct stv090x_config *feconf = (struct stv090x_config *) chan->dev->card_info->fe_config[chan->number]; - /* tuner 1+2: i2c adapter #0, tuner 3+4: i2c adapter #1 */ - /* Note: Both adapters share the same i2c bus, but the demod */ - /* driver requires that each demod has its own i2c adapter */ - if (chan->number < 2) - i2c = &chan->dev->channel[0].i2c_adapter; - else - i2c = &chan->dev->channel[1].i2c_adapter; - chan->fe = dvb_attach(stv090x_attach, feconf, i2c, (chan->number & 1) == 0 ? STV090x_DEMODULATOR_0 : STV090x_DEMODULATOR_1);