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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
Cc: netdev@xxxxxxxxxxxxxxx
[...]

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



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux