From patchwork Sat Aug 6 10:48:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 73386 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp2519799qga; Sat, 6 Aug 2016 13:13:48 -0700 (PDT) X-Received: by 10.98.82.74 with SMTP id g71mr147113679pfb.157.1470514428066; Sat, 06 Aug 2016 13:13:48 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si27644936pav.151.2016.08.06.13.13.47; Sat, 06 Aug 2016 13:13:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750933AbcHFUNr (ORCPT + 4 others); Sat, 6 Aug 2016 16:13:47 -0400 Received: from mail-lf0-f41.google.com ([209.85.215.41]:33305 "EHLO mail-lf0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751063AbcHFUMZ (ORCPT ); Sat, 6 Aug 2016 16:12:25 -0400 Received: by mail-lf0-f41.google.com with SMTP id b199so224372785lfe.0 for ; Sat, 06 Aug 2016 13:12:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=YCTpvjQsW9qQsl5+C3ZggXggJjwYM8FL3czAK8f/iqM=; b=UIDzHMJxJRQzMeMttwZGIvOoc2awiMUfmZtI1mwxG/iVwIF8lfgUEzOpJmYLe9D4LJ 7qYLS84U6AZTVfd73qscBGppsjs1beLbhC/+HXISbLeIqvoS+qm0bXpoj7s9IpKwNlx7 MvoofLeZfQ0dKO/GpXuMsAj/nOsqtJ4lI1p5g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=YCTpvjQsW9qQsl5+C3ZggXggJjwYM8FL3czAK8f/iqM=; b=Y6QouGBQ7SPHxrUF+zOGa4limu4qci6SXJEoZMaA1j6xxi+EoiYOMOcDt22ybstrp2 OWYV/Ta01+s+pa8aTcdb/ry39NLsq6QW+f8OwLapuUVLD36UgMbqS67/PwWy0E9kVBZ0 qF9hMu5I6CIH67C7I8sNZIQkjaNRVz58adC+JDsC2cYkz+XRud8QpUtzGlZqTY0igeE3 qVJX6RhSyP7VsgbUhj4ddvINroV5TYSBF8lHU9BtTEG2/vm111Z5InG69hioFwE9xh53 m0kbl0PAChqQCG3YXz8LaMksb5saUkq0KPCbpQpztk10TaVC8mIJhDduW+brtAu3oIvN Lbwg== X-Gm-Message-State: AEkooutTJqQnDvb9dlXLJsRGQAdTGvbORK0/bcCAHk2u/zx+hplBs6RMYxcRrjmfeOW9xKlF X-Received: by 10.25.16.162 with SMTP id 34mr28186506lfq.127.1470480542671; Sat, 06 Aug 2016 03:49:02 -0700 (PDT) Received: from localhost.localdomain (153-224-132-95.pool.ukrtel.net. [95.132.224.153]) by smtp.gmail.com with ESMTPSA id p128sm3916360lfb.32.2016.08.06.03.49.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 06 Aug 2016 03:49:02 -0700 (PDT) From: Ivan Khoronzhuk To: netdev@vger.kernel.org, mugunthanvnm@ti.com, grygorii.strashko@ti.com Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, dlide@ti.com, Ivan Khoronzhuk Subject: [PATCH v2 04/14] net: ethernet: ti: cpsw: remove clk var from priv Date: Sat, 6 Aug 2016 13:48:34 +0300 Message-Id: <1470480524-6851-5-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1470480524-6851-1-git-send-email-ivan.khoronzhuk@linaro.org> References: <1470480524-6851-1-git-send-email-ivan.khoronzhuk@linaro.org> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org There is no need to hold link to clk, it's used only once while probe. Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 30e1ddb..70a9570 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -379,7 +379,6 @@ struct cpsw_priv { u32 coal_intvl; u32 bus_freq_mhz; int rx_packet_max; - struct clk *clk; u8 mac_addr[ETH_ALEN]; struct cpsw_slave *slaves; struct cpdma_ctlr *dma; @@ -2179,8 +2178,6 @@ static int cpsw_probe_dual_emac(struct platform_device *pdev, memcpy(ndev->dev_addr, priv_sl2->mac_addr, ETH_ALEN); priv_sl2->slaves = priv->slaves; - priv_sl2->clk = priv->clk; - priv_sl2->coal_intvl = 0; priv_sl2->bus_freq_mhz = priv->bus_freq_mhz; @@ -2258,6 +2255,7 @@ MODULE_DEVICE_TABLE(of, cpsw_of_mtable); static int cpsw_probe(struct platform_device *pdev) { + struct clk *clk; struct cpsw_platform_data *data; struct net_device *ndev; struct cpsw_priv *priv; @@ -2336,14 +2334,14 @@ static int cpsw_probe(struct platform_device *pdev) priv->slaves[0].ndev = ndev; priv->emac_port = 0; - priv->clk = devm_clk_get(&pdev->dev, "fck"); - if (IS_ERR(priv->clk)) { + clk = devm_clk_get(&pdev->dev, "fck"); + if (IS_ERR(clk)) { dev_err(priv->dev, "fck is not found\n"); ret = -ENODEV; goto clean_runtime_disable_ret; } priv->coal_intvl = 0; - priv->bus_freq_mhz = clk_get_rate(priv->clk) / 1000000; + priv->bus_freq_mhz = clk_get_rate(clk) / 1000000; ss_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ss_regs = devm_ioremap_resource(&pdev->dev, ss_res);