From patchwork Tue Aug 9 23:22:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 9272373 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 E8A0860839 for ; Tue, 9 Aug 2016 23:27:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C435425227 for ; Tue, 9 Aug 2016 23:27:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B909C27F80; Tue, 9 Aug 2016 23:27:52 +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 43EB826785 for ; Tue, 9 Aug 2016 23:27:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932856AbcHIX1F (ORCPT ); Tue, 9 Aug 2016 19:27:05 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:37428 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932692AbcHIXX3 (ORCPT ); Tue, 9 Aug 2016 19:23:29 -0400 Received: by mail-wm0-f53.google.com with SMTP id i5so67095983wmg.0 for ; Tue, 09 Aug 2016 16:23:28 -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=XO35xESEV6BqW/ODiwgDqeAKHN1Gtpmwea0Ky4yFK74=; b=IfcOfORNTrKi2fv1i1hCA8sh80WowBMofFdWzTiyVHxGV+Asb0ekbPXAU2y2+/uAfx 4wZL/LBEvvasx8UjbcnopuThypEO3s9lu6EDgGZwkoxo2xD9U8P4pDZU+5HDzL/wJFWw t3cgicKEUt+B/dOtKLAdkWHw7jsVaF8f9Nthw= 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=XO35xESEV6BqW/ODiwgDqeAKHN1Gtpmwea0Ky4yFK74=; b=Nr9IQCjtPMy5dv5d/ckRSuPPuHTke1v16BK9t7MPR9JgPJeN1H9DWsB3YLDrGSW1pw b9EW+EHvLqPXUnZxCH19OPRv0jm48naqqXTh7SS0+tY+/BaGYc9oYtd+yz5N/GZriwGt cF1azcPOsKmqywRmipvIcTi1jpvYmtF4wlFF+4SntGA1OvUoOoQxSQ8fRyaYDPjqcmx7 sgiPZZU4IZzGu+w58my+bNc+HN+NRvWlMlu9Xt+9SuR/N3eWerz/w8me29otfxVcx3G+ /qW2qVUYlgqj8lqKUhr60WZlNxCck1oN/VYPPzqmm5qfK9yPcNj99CMvHB/FVA0o7DjC FP+A== X-Gm-Message-State: AEkoouus3eZfcyrsWz7lU+Lo2Xe1XOEDa21Q1dlVjah/xWkjUZcaafnG1t6dqHI/ha6OBuWV X-Received: by 10.25.163.205 with SMTP id m196mr119443lfe.5.1470785007853; Tue, 09 Aug 2016 16:23:27 -0700 (PDT) Received: from localhost.localdomain (88-203-94-178.pool.ukrtel.net. [178.94.203.88]) by smtp.gmail.com with ESMTPSA id s2sm904627lja.35.2016.08.09.16.23.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Aug 2016 16:23:27 -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 v3 04/13] net: ethernet: ti: cpsw: remove clk var from priv Date: Wed, 10 Aug 2016 02:22:35 +0300 Message-Id: <1470784964-26440-5-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1470784964-26440-1-git-send-email-ivan.khoronzhuk@linaro.org> References: <1470784964-26440-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. Reviewed-by: Mugunthan V N Reviewed-by: Grygorii Strashko Signed-off-by: Ivan Khoronzhuk --- 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 4f6a4c1..0b6958d 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; @@ -2177,8 +2176,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; @@ -2256,6 +2253,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; @@ -2334,14 +2332,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);