Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281517
b: refs/heads/master
c: 461845d
h: refs/heads/master
i:
  281515: 90160ff
v: v3
  • Loading branch information
Jamie Iles committed Nov 22, 2011
1 parent 86690ad commit 412dadb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 865d605ee81813dc73d5422fd2f9bd132d10d194
refs/heads/master: 461845db2176d2e11b45f1f24cbd0ed8ddf26fcb
23 changes: 2 additions & 21 deletions trunk/drivers/net/ethernet/cadence/macb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1152,28 +1152,19 @@ static int __init macb_probe(struct platform_device *pdev)

spin_lock_init(&bp->lock);

#if defined(CONFIG_ARCH_AT91)
bp->pclk = clk_get(&pdev->dev, "macb_clk");
bp->pclk = clk_get(&pdev->dev, "pclk");
if (IS_ERR(bp->pclk)) {
dev_err(&pdev->dev, "failed to get macb_clk\n");
goto err_out_free_dev;
}
clk_enable(bp->pclk);
#else
bp->pclk = clk_get(&pdev->dev, "pclk");
if (IS_ERR(bp->pclk)) {
dev_err(&pdev->dev, "failed to get pclk\n");
goto err_out_free_dev;
}

bp->hclk = clk_get(&pdev->dev, "hclk");
if (IS_ERR(bp->hclk)) {
dev_err(&pdev->dev, "failed to get hclk\n");
goto err_out_put_pclk;
}

clk_enable(bp->pclk);
clk_enable(bp->hclk);
#endif

bp->regs = ioremap(regs->start, resource_size(regs));
if (!bp->regs) {
Expand Down Expand Up @@ -1256,14 +1247,10 @@ static int __init macb_probe(struct platform_device *pdev)
err_out_iounmap:
iounmap(bp->regs);
err_out_disable_clocks:
#ifndef CONFIG_ARCH_AT91
clk_disable(bp->hclk);
clk_put(bp->hclk);
#endif
clk_disable(bp->pclk);
#ifndef CONFIG_ARCH_AT91
err_out_put_pclk:
#endif
clk_put(bp->pclk);
err_out_free_dev:
free_netdev(dev);
Expand All @@ -1289,10 +1276,8 @@ static int __exit macb_remove(struct platform_device *pdev)
unregister_netdev(dev);
free_irq(dev->irq, dev);
iounmap(bp->regs);
#ifndef CONFIG_ARCH_AT91
clk_disable(bp->hclk);
clk_put(bp->hclk);
#endif
clk_disable(bp->pclk);
clk_put(bp->pclk);
free_netdev(dev);
Expand All @@ -1310,9 +1295,7 @@ static int macb_suspend(struct platform_device *pdev, pm_message_t state)

netif_device_detach(netdev);

#ifndef CONFIG_ARCH_AT91
clk_disable(bp->hclk);
#endif
clk_disable(bp->pclk);

return 0;
Expand All @@ -1324,9 +1307,7 @@ static int macb_resume(struct platform_device *pdev)
struct macb *bp = netdev_priv(netdev);

clk_enable(bp->pclk);
#ifndef CONFIG_ARCH_AT91
clk_enable(bp->hclk);
#endif

netif_device_attach(netdev);

Expand Down

0 comments on commit 412dadb

Please sign in to comment.