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: 9265977 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 5822A6075A for ; Sat, 6 Aug 2016 20:13:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 491FC27F88 for ; Sat, 6 Aug 2016 20:13:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D824283EF; Sat, 6 Aug 2016 20:13:48 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, 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 C245D27F88 for ; Sat, 6 Aug 2016 20:13:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750933AbcHFUNr (ORCPT ); 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 X-Virus-Scanned: ClamAV using ClamSMTP There is no need to hold link to clk, it's used only once while probe. Signed-off-by: Ivan Khoronzhuk Reviewed-by: Mugunthan V N Reviewed-by: Grygorii Strashko --- drivers/net/ethernet/ti/cpsw.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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);