diff options
-rw-r--r-- | drivers/net/pcmcia/axnet_cs.c | 7 | ||||
-rw-r--r-- | drivers/net/pcmcia/pcnet_cs.c | 9 |
2 files changed, 11 insertions, 5 deletions
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 808fae1577e0..50dff1b81d34 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -521,6 +521,7 @@ static void mdio_write(kio_addr_t addr, int phy_id, int loc, int value) | |||
521 | 521 | ||
522 | static int axnet_open(struct net_device *dev) | 522 | static int axnet_open(struct net_device *dev) |
523 | { | 523 | { |
524 | int ret; | ||
524 | axnet_dev_t *info = PRIV(dev); | 525 | axnet_dev_t *info = PRIV(dev); |
525 | struct pcmcia_device *link = info->p_dev; | 526 | struct pcmcia_device *link = info->p_dev; |
526 | 527 | ||
@@ -529,9 +530,11 @@ static int axnet_open(struct net_device *dev) | |||
529 | if (!pcmcia_dev_present(link)) | 530 | if (!pcmcia_dev_present(link)) |
530 | return -ENODEV; | 531 | return -ENODEV; |
531 | 532 | ||
532 | link->open++; | 533 | ret = request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, "axnet_cs", dev); |
534 | if (ret) | ||
535 | return ret; | ||
533 | 536 | ||
534 | request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, "axnet_cs", dev); | 537 | link->open++; |
535 | 538 | ||
536 | info->link_status = 0x00; | 539 | info->link_status = 0x00; |
537 | init_timer(&info->watchdog); | 540 | init_timer(&info->watchdog); |
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 61f7a4f3ee65..f2613c29b008 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -960,6 +960,7 @@ static void mii_phy_probe(struct net_device *dev) | |||
960 | 960 | ||
961 | static int pcnet_open(struct net_device *dev) | 961 | static int pcnet_open(struct net_device *dev) |
962 | { | 962 | { |
963 | int ret; | ||
963 | pcnet_dev_t *info = PRIV(dev); | 964 | pcnet_dev_t *info = PRIV(dev); |
964 | struct pcmcia_device *link = info->p_dev; | 965 | struct pcmcia_device *link = info->p_dev; |
965 | 966 | ||
@@ -968,10 +969,12 @@ static int pcnet_open(struct net_device *dev) | |||
968 | if (!pcmcia_dev_present(link)) | 969 | if (!pcmcia_dev_present(link)) |
969 | return -ENODEV; | 970 | return -ENODEV; |
970 | 971 | ||
971 | link->open++; | ||
972 | |||
973 | set_misc_reg(dev); | 972 | set_misc_reg(dev); |
974 | request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, dev_info, dev); | 973 | ret = request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, dev_info, dev); |
974 | if (ret) | ||
975 | return ret; | ||
976 | |||
977 | link->open++; | ||
975 | 978 | ||
976 | info->phy_id = info->eth_phy; | 979 | info->phy_id = info->eth_phy; |
977 | info->link_status = 0x00; | 980 | info->link_status = 0x00; |