linux-mips
[Top] [All Lists]

Re: [PATCH V2 11/14] NET: MIPS: lantiq: convert etop driver to clkdev ap

To: John Crispin <blogic@openwrt.org>
Subject: Re: [PATCH V2 11/14] NET: MIPS: lantiq: convert etop driver to clkdev api
From: Sergei Shtylyov <sshtylyov@mvista.com>
Date: Fri, 24 Feb 2012 14:55:15 +0400
Authentication-results: mr.google.com; spf=pass (google.com: domain of sshtylyov@mvista.com designates 10.205.129.137 as permitted sender) smtp.mail=sshtylyov@mvista.com
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org, netdev@vger.kernel.org
In-reply-to: <1330012993-13510-11-git-send-email-blogic@openwrt.org>
References: <1330012993-13510-1-git-send-email-blogic@openwrt.org> <1330012993-13510-11-git-send-email-blogic@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
Hello.

On 23-02-2012 20:03, John Crispin wrote:

Update from old pmu_{dis,en}able() to ckldev api.

Signed-off-by: John Crispin<blogic@openwrt.org>
Cc: netdev@vger.kernel.org
[...]

diff --git a/drivers/net/ethernet/lantiq_etop.c 
b/drivers/net/ethernet/lantiq_etop.c
index e5ec8b1..6b2e4b4 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
[...]
@@ -886,6 +903,22 @@ ltq_etop_probe(struct platform_device *pdev)
        priv->pdev = pdev;
        priv->pldata = dev_get_platdata(&pdev->dev);
        priv->netdev = dev;
+
+       priv->clk_ppe = clk_get(&pdev->dev, NULL);
+       if (!priv->clk_ppe)
+               return -ENOENT;
+       if (ltq_has_gbit()) {
+               priv->clk_switch = clk_get(&pdev->dev, "switch");
+               if (!priv->clk_switch)

   clk_get() doesn't retirn NULL, it returns error code.

+                       return -ENOENT;
+       }
+       if (ltq_is_ase()) {
+               priv->clk_ephy = clk_get(&pdev->dev, "ephy");
+               priv->clk_ephycgu = clk_get(&pdev->dev, "ephycgu");
+               if (!priv->clk_ephy || !priv->clk_ephycgu)

   Same here.

WBR, Sergei

<Prev in Thread] Current Thread [Next in Thread>