From patchwork Sun Oct 15 20:51:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Scheller X-Patchwork-Id: 10007263 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 8605A60216 for ; Sun, 15 Oct 2017 20:52:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75BFC252D5 for ; Sun, 15 Oct 2017 20:52:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A6A8256E6; Sun, 15 Oct 2017 20:52:09 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 E97C525404 for ; Sun, 15 Oct 2017 20:52:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751416AbdJOUwD (ORCPT ); Sun, 15 Oct 2017 16:52:03 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:53289 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751352AbdJOUwB (ORCPT ); Sun, 15 Oct 2017 16:52:01 -0400 Received: by mail-wm0-f65.google.com with SMTP id q132so30818271wmd.2 for ; Sun, 15 Oct 2017 13:52:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ypm5rP9/Hi3e8njeGQ1Vep89q3ZlZCGcjEKo+WjhiC0=; b=YGGMMl7r0nYsBlyPI1RXBNiMeTO/Xa1KCn56zhohM+3Ds428QQslWKr26LAbzF0Vzy vAnORS66Mm1O+lttyxWBmlGjdrhhfWHk5x0WeKBY29JjxI4+mZ0g285y2Ux9fV4gOSfU BcpdeJtmbU9+H1JE7HL7n3SBhUR+Fk8sg6kbpkcW3lki9xffi05Co+xPtB2u9zp/JE/q H1akMnfqauKtHGK4oEs6TeN1OcsftsUqtKwkUs2FtXHbKlWETDLIZzd2wdOksnEZ9ykk H7bGFyJW670Mi8s0bkiP9oLVuKSl+f7pNuaZ4v224OkwuKA1a+Hh9ISBOgSvXF44MrFp 6mnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ypm5rP9/Hi3e8njeGQ1Vep89q3ZlZCGcjEKo+WjhiC0=; b=tlCfDuG6whWcPTcmC1k7UBeBIGQFkV7bwcxYvUfDY4bqhqhpYXPsZHKV+Kqr8qeoAy qIryzq/pJg8RcGBk68LJpZ47hGnOeYCCnIBW0dPntfuKmrCeL3vUeW9rE5K2D3/RgIhP S0Bw6e5xXu4lJ20VXQMznZLajv6eyQY48MgR33BUOuvB54lQ3BbNcK79P3iOnZ6Q0waG w9be7lXyXQMpC/3a126SPW/MdztqJ8SNmpF2ZvuTZ2AnB9oodvTilv7XduqTHII63OUf yXCXT2TEUQ3zpHB0gGOxgV5zL8edwOiIhPbDMrcB3piXLQiairmAhsijHc1Zwe4kf59F 4KgA== X-Gm-Message-State: AMCzsaUL8JHTeI5huCjJTlNn4FUzbXPyrUwMrhCJiZaFW0ArjA5Y2u1D LIOFXzUKZfx98SMUhVpreWKfkQ== X-Google-Smtp-Source: ABhQp+SI//E9ioCuefJf3o6Ez9wC29fSHjtAOUrjZtwp4DXbbYnM2XXmWvUPbNDFWF2Ryso67LZxpw== X-Received: by 10.28.25.129 with SMTP id 123mr5659981wmz.17.1508100720268; Sun, 15 Oct 2017 13:52:00 -0700 (PDT) Received: from dvbdev.wuest.de (ip-37-201-239-211.hsi13.unitymediagroup.de. [37.201.239.211]) by smtp.gmail.com with ESMTPSA id d18sm4609498wra.50.2017.10.15.13.51.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 15 Oct 2017 13:51:59 -0700 (PDT) From: Daniel Scheller To: linux-media@vger.kernel.org, mchehab@kernel.org, mchehab@s-opensource.com Cc: jasmin@anw.at, rjkm@metzlerbros.de Subject: [PATCH 1/8] [media] ddbridge: remove unneeded *fe vars from attach functions Date: Sun, 15 Oct 2017 22:51:50 +0200 Message-Id: <20171015205157.14342-2-d.scheller.oss@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171015205157.14342-1-d.scheller.oss@gmail.com> References: <20171015205157.14342-1-d.scheller.oss@gmail.com> 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 These are only used in C/T demod attach functions, don't add any real benefit (ie. line length savings) and in case of cxd28xx_attach aren't even used consequently. Remove them. Signed-off-by: Daniel Scheller --- drivers/media/pci/ddbridge/ddbridge-core.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c index f4bd4908acdd..653e7986923c 100644 --- a/drivers/media/pci/ddbridge/ddbridge-core.c +++ b/drivers/media/pci/ddbridge/ddbridge-core.c @@ -848,21 +848,20 @@ static int demod_attach_drxk(struct ddb_input *input) struct i2c_adapter *i2c = &input->port->i2c->adap; struct ddb_dvb *dvb = &input->port->dvb[input->nr & 1]; struct device *dev = input->port->dev->dev; - struct dvb_frontend *fe; struct drxk_config config; memset(&config, 0, sizeof(config)); config.adr = 0x29 + (input->nr & 1); config.microcode_name = "drxk_a3.mc"; - fe = dvb->fe = dvb_attach(drxk_attach, &config, i2c); - if (!fe) { + dvb->fe = dvb_attach(drxk_attach, &config, i2c); + if (!dvb->fe) { dev_err(dev, "No DRXK found!\n"); return -ENODEV; } - fe->sec_priv = input; - dvb->i2c_gate_ctrl = fe->ops.i2c_gate_ctrl; - fe->ops.i2c_gate_ctrl = locked_gate_ctrl; + dvb->fe->sec_priv = input; + dvb->i2c_gate_ctrl = dvb->fe->ops.i2c_gate_ctrl; + dvb->fe->ops.i2c_gate_ctrl = locked_gate_ctrl; return 0; } @@ -912,19 +911,18 @@ static int demod_attach_stv0367(struct ddb_input *input) struct i2c_adapter *i2c = &input->port->i2c->adap; struct ddb_dvb *dvb = &input->port->dvb[input->nr & 1]; struct device *dev = input->port->dev->dev; - struct dvb_frontend *fe; /* attach frontend */ - fe = dvb->fe = dvb_attach(stv0367ddb_attach, + dvb->fe = dvb_attach(stv0367ddb_attach, &ddb_stv0367_config[(input->nr & 1)], i2c); if (!dvb->fe) { dev_err(dev, "No stv0367 found!\n"); return -ENODEV; } - fe->sec_priv = input; - dvb->i2c_gate_ctrl = fe->ops.i2c_gate_ctrl; - fe->ops.i2c_gate_ctrl = locked_gate_ctrl; + dvb->fe->sec_priv = input; + dvb->i2c_gate_ctrl = dvb->fe->ops.i2c_gate_ctrl; + dvb->fe->ops.i2c_gate_ctrl = locked_gate_ctrl; return 0; } @@ -956,7 +954,6 @@ static int demod_attach_cxd28xx(struct ddb_input *input, int par, int osc24) struct i2c_adapter *i2c = &input->port->i2c->adap; struct ddb_dvb *dvb = &input->port->dvb[input->nr & 1]; struct device *dev = input->port->dev->dev; - struct dvb_frontend *fe; struct cxd2841er_config cfg; /* the cxd2841er driver expects 8bit/shifted I2C addresses */ @@ -971,15 +968,15 @@ static int demod_attach_cxd28xx(struct ddb_input *input, int par, int osc24) cfg.flags |= CXD2841ER_TS_SERIAL; /* attach frontend */ - fe = dvb->fe = dvb_attach(cxd2841er_attach_t_c, &cfg, i2c); + dvb->fe = dvb_attach(cxd2841er_attach_t_c, &cfg, i2c); if (!dvb->fe) { dev_err(dev, "No cxd2837/38/43/54 found!\n"); return -ENODEV; } - fe->sec_priv = input; - dvb->i2c_gate_ctrl = fe->ops.i2c_gate_ctrl; - fe->ops.i2c_gate_ctrl = locked_gate_ctrl; + dvb->fe->sec_priv = input; + dvb->i2c_gate_ctrl = dvb->fe->ops.i2c_gate_ctrl; + dvb->fe->ops.i2c_gate_ctrl = locked_gate_ctrl; return 0; }