aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/arm/at91_ether.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-11-03 08:53:52 +0000
committerBen Dooks <ben-linux@fluff.org>2008-11-03 08:53:52 +0000
commitf430ce6ec4c8071d358e56d531ad77bdb5cf1820 (patch)
tree94e2d6b4d84148b7b118dfedebbbd6728dfa5547 /drivers/net/arm/at91_ether.c
parent2c68bcc9ffc5de11493f99e0ea891003f9c0a835 (diff)
parent45beca08dd8b6d6a65c5ffd730af2eac7a2c7a03 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into s3c64xx
Diffstat (limited to 'drivers/net/arm/at91_ether.c')
-rw-r--r--drivers/net/arm/at91_ether.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c
index 0fa53464efb..6f431a887e7 100644
--- a/drivers/net/arm/at91_ether.c
+++ b/drivers/net/arm/at91_ether.c
@@ -1080,7 +1080,8 @@ static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_add
init_timer(&lp->check_timer);
lp->check_timer.data = (unsigned long)dev;
lp->check_timer.function = at91ether_check_link;
- }
+ } else if (lp->board_data.phy_irq_pin >= 32)
+ gpio_request(lp->board_data.phy_irq_pin, "ethernet_phy");
/* Display ethernet banner */
printk(KERN_INFO "%s: AT91 ethernet at 0x%08x int=%d %s%s (%s)\n",
@@ -1167,6 +1168,9 @@ static int __devexit at91ether_remove(struct platform_device *pdev)
struct net_device *dev = platform_get_drvdata(pdev);
struct at91_private *lp = netdev_priv(dev);
+ if (lp->board_data.phy_irq_pin >= 32)
+ gpio_free(lp->board_data.phy_irq_pin);
+
unregister_netdev(dev);
free_irq(dev->irq, dev);
dma_free_coherent(NULL, sizeof(struct recv_desc_bufs), lp->dlist, (dma_addr_t)lp->dlist_phys);