Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1457381 > unrolled thread

[PATCH v2 04/14] net: ethernet: ti: cpsw: remove clk var from priv

Started byIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
First post2016-08-06 23:50 +0200
Last post2016-08-09 13:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 04/14] net: ethernet: ti: cpsw: remove clk var from priv Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> - 2016-08-06 23:50 +0200
    Re: [PATCH v2 04/14] net: ethernet: ti: cpsw: remove clk var from  priv Grygorii Strashko <grygorii.strashko@ti.com> - 2016-08-09 13:40 +0200

#1457381 — [PATCH v2 04/14] net: ethernet: ti: cpsw: remove clk var from priv

FromIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Date2016-08-06 23:50 +0200
Subject[PATCH v2 04/14] net: ethernet: ti: cpsw: remove clk var from priv
Message-ID<s3hDI-2QM-19@gated-at.bofh.it>
There is no need to hold link to clk, it's used only once
while probe.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
---
 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);
-- 
1.9.1

[toc] | [next] | [standalone]


#1458618 — Re: [PATCH v2 04/14] net: ethernet: ti: cpsw: remove clk var from priv

FromGrygorii Strashko <grygorii.strashko@ti.com>
Date2016-08-09 13:40 +0200
SubjectRe: [PATCH v2 04/14] net: ethernet: ti: cpsw: remove clk var from priv
Message-ID<s4dy1-6VH-1@gated-at.bofh.it>
In reply to#1457381
On 08/06/2016 01:48 PM, Ivan Khoronzhuk wrote:
> There is no need to hold link to clk, it's used only once
> while probe.
>
> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
> ---
>  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

Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>


-- 
regards,
-grygorii

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web