net/stmmac: fix issue of clk_get for Loongson1B.
authorKelvin Cheung <keguang.zhang@gmail.com>
Sat, 18 Aug 2012 00:16:23 +0000 (00:16 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Aug 2012 09:52:20 +0000 (02:52 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index fd8882f9602afc43b6fe6ecd79a14defb5ac8dbe..c136162e6473e1746b48f50a0c7cc0adc57986d6 100644 (file)
@@ -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;