diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-04-25 20:30:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-28 21:48:39 -0400 |
commit | 86cc070eb19640d42941d3074e42c761d4c1c59c (patch) | |
tree | f8cb002ccd8334b910d45c3189fa4c60ffaba487 | |
parent | c5f0f83c3be4c965c40c78d52000db30c0ceab5d (diff) |
net/at91_ether: use gpio_to_irq for phy IRQ line
Use the gpio_to_irq() function to retrieve the phy IRQ line
from the GPIO pin specification.
This fix is needed now that we have moved to irqdomains on AT91.
Reported-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Andrew Victor <avictor.za@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/cadence/at91_ether.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/cadence/at91_ether.c b/drivers/net/ethernet/cadence/at91_ether.c index 62761e19e21..77884191a8c 100644 --- a/drivers/net/ethernet/cadence/at91_ether.c +++ b/drivers/net/ethernet/cadence/at91_ether.c | |||
@@ -263,7 +263,7 @@ static void enable_phyirq(struct net_device *dev) | |||
263 | return; | 263 | return; |
264 | } | 264 | } |
265 | 265 | ||
266 | irq_number = lp->board_data.phy_irq_pin; | 266 | irq_number = gpio_to_irq(lp->board_data.phy_irq_pin); |
267 | status = request_irq(irq_number, at91ether_phy_interrupt, 0, dev->name, dev); | 267 | status = request_irq(irq_number, at91ether_phy_interrupt, 0, dev->name, dev); |
268 | if (status) { | 268 | if (status) { |
269 | printk(KERN_ERR "at91_ether: PHY IRQ %d request failed - status %d!\n", irq_number, status); | 269 | printk(KERN_ERR "at91_ether: PHY IRQ %d request failed - status %d!\n", irq_number, status); |
@@ -363,7 +363,7 @@ static void disable_phyirq(struct net_device *dev) | |||
363 | disable_mdi(lp); | 363 | disable_mdi(lp); |
364 | spin_unlock_irq(&lp->lock); | 364 | spin_unlock_irq(&lp->lock); |
365 | 365 | ||
366 | irq_number = lp->board_data.phy_irq_pin; | 366 | irq_number = gpio_to_irq(lp->board_data.phy_irq_pin); |
367 | free_irq(irq_number, dev); /* Free interrupt handler */ | 367 | free_irq(irq_number, dev); /* Free interrupt handler */ |
368 | } | 368 | } |
369 | 369 | ||
@@ -1234,7 +1234,7 @@ static int at91ether_suspend(struct platform_device *pdev, pm_message_t mesg) | |||
1234 | 1234 | ||
1235 | if (netif_running(net_dev)) { | 1235 | if (netif_running(net_dev)) { |
1236 | if (gpio_is_valid(lp->board_data.phy_irq_pin)) { | 1236 | if (gpio_is_valid(lp->board_data.phy_irq_pin)) { |
1237 | int phy_irq = lp->board_data.phy_irq_pin; | 1237 | int phy_irq = gpio_to_irq(lp->board_data.phy_irq_pin); |
1238 | disable_irq(phy_irq); | 1238 | disable_irq(phy_irq); |
1239 | } | 1239 | } |
1240 | 1240 | ||
@@ -1258,7 +1258,7 @@ static int at91ether_resume(struct platform_device *pdev) | |||
1258 | netif_start_queue(net_dev); | 1258 | netif_start_queue(net_dev); |
1259 | 1259 | ||
1260 | if (gpio_is_valid(lp->board_data.phy_irq_pin)) { | 1260 | if (gpio_is_valid(lp->board_data.phy_irq_pin)) { |
1261 | int phy_irq = lp->board_data.phy_irq_pin; | 1261 | int phy_irq = gpio_to_irq(lp->board_data.phy_irq_pin); |
1262 | enable_irq(phy_irq); | 1262 | enable_irq(phy_irq); |
1263 | } | 1263 | } |
1264 | } | 1264 | } |