Patchwork net/stmmac: fix issue of clk_get for Loongson1B.

login
register
mail settings
Submitter Kelvin Cheung
Date Aug. 18, 2012, 10:16 a.m.
Message ID <1345284983-12610-1-git-send-email-keguang.zhang@gmail.com>
Download mbox | patch
Permalink /patch/178442/
State Accepted
Delegated to: David Miller
Headers show

Comments

Kelvin Cheung - Aug. 18, 2012, 10:16 a.m.
When getting clock, give a chance to the CPUs without DT support,
which use Common Clock Framework, such as Loongson1B.

Signed-off-by: Kelvin Cheung <keguang.zhang@gmail.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
David Miller - Aug. 20, 2012, 9:52 a.m.
From: Kelvin Cheung <keguang.zhang@gmail.com>
Date: Sat, 18 Aug 2012 18:16:23 +0800

> When getting clock, give a chance to the CPUs without DT support,
> which use Common Clock Framework, such as Loongson1B.
> 
> Signed-off-by: Kelvin Cheung <keguang.zhang@gmail.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index fd8882f..c136162 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2077,7 +2077,7 @@  struct stmmac_priv *stmmac_dvr_probe(struct device *device,
 		goto error_netdev_register;
 	}
 
-	priv->stmmac_clk = clk_get(priv->device, NULL);
+	priv->stmmac_clk = clk_get(priv->device, STMMAC_RESOURCE_NAME);
 	if (IS_ERR(priv->stmmac_clk)) {
 		pr_warning("%s: warning: cannot get CSR clock\n", __func__);
 		goto error_clk_get;