diff options
Diffstat (limited to 'drivers/net/pcmcia/xirc2ps_cs.c')
-rw-r--r-- | drivers/net/pcmcia/xirc2ps_cs.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c index f5fa86d046d4..94a1e644abdc 100644 --- a/drivers/net/pcmcia/xirc2ps_cs.c +++ b/drivers/net/pcmcia/xirc2ps_cs.c | |||
@@ -332,7 +332,7 @@ static irqreturn_t xirc2ps_interrupt(int irq, void *dev_id, struct pt_regs *regs | |||
332 | */ | 332 | */ |
333 | 333 | ||
334 | typedef struct local_info_t { | 334 | typedef struct local_info_t { |
335 | dev_link_t link; | 335 | struct pcmcia_device *p_dev; |
336 | dev_node_t node; | 336 | dev_node_t node; |
337 | struct net_device_stats stats; | 337 | struct net_device_stats stats; |
338 | int card_type; | 338 | int card_type; |
@@ -555,9 +555,9 @@ mii_wr(kio_addr_t ioaddr, u_char phyaddr, u_char phyreg, unsigned data, int len) | |||
555 | static int | 555 | static int |
556 | xirc2ps_attach(struct pcmcia_device *p_dev) | 556 | xirc2ps_attach(struct pcmcia_device *p_dev) |
557 | { | 557 | { |
558 | dev_link_t *link; | ||
559 | struct net_device *dev; | 558 | struct net_device *dev; |
560 | local_info_t *local; | 559 | local_info_t *local; |
560 | dev_link_t *link = dev_to_instance(p_dev); | ||
561 | 561 | ||
562 | DEBUG(0, "attach()\n"); | 562 | DEBUG(0, "attach()\n"); |
563 | 563 | ||
@@ -566,7 +566,7 @@ xirc2ps_attach(struct pcmcia_device *p_dev) | |||
566 | if (!dev) | 566 | if (!dev) |
567 | return -ENOMEM; | 567 | return -ENOMEM; |
568 | local = netdev_priv(dev); | 568 | local = netdev_priv(dev); |
569 | link = &local->link; | 569 | local->p_dev = p_dev; |
570 | link->priv = dev; | 570 | link->priv = dev; |
571 | 571 | ||
572 | /* General socket configuration */ | 572 | /* General socket configuration */ |
@@ -592,9 +592,6 @@ xirc2ps_attach(struct pcmcia_device *p_dev) | |||
592 | dev->watchdog_timeo = TX_TIMEOUT; | 592 | dev->watchdog_timeo = TX_TIMEOUT; |
593 | #endif | 593 | #endif |
594 | 594 | ||
595 | link->handle = p_dev; | ||
596 | p_dev->instance = link; | ||
597 | |||
598 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; | 595 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; |
599 | xirc2ps_config(link); | 596 | xirc2ps_config(link); |
600 | 597 | ||
@@ -616,7 +613,7 @@ xirc2ps_detach(struct pcmcia_device *p_dev) | |||
616 | 613 | ||
617 | DEBUG(0, "detach(0x%p)\n", link); | 614 | DEBUG(0, "detach(0x%p)\n", link); |
618 | 615 | ||
619 | if (link->dev) | 616 | if (link->dev_node) |
620 | unregister_netdev(dev); | 617 | unregister_netdev(dev); |
621 | 618 | ||
622 | if (link->state & DEV_CONFIG) | 619 | if (link->state & DEV_CONFIG) |
@@ -1049,13 +1046,13 @@ xirc2ps_config(dev_link_t * link) | |||
1049 | if (local->dingo) | 1046 | if (local->dingo) |
1050 | do_reset(dev, 1); /* a kludge to make the cem56 work */ | 1047 | do_reset(dev, 1); /* a kludge to make the cem56 work */ |
1051 | 1048 | ||
1052 | link->dev = &local->node; | 1049 | link->dev_node = &local->node; |
1053 | link->state &= ~DEV_CONFIG_PENDING; | 1050 | link->state &= ~DEV_CONFIG_PENDING; |
1054 | SET_NETDEV_DEV(dev, &handle_to_dev(handle)); | 1051 | SET_NETDEV_DEV(dev, &handle_to_dev(handle)); |
1055 | 1052 | ||
1056 | if ((err=register_netdev(dev))) { | 1053 | if ((err=register_netdev(dev))) { |
1057 | printk(KNOT_XIRC "register_netdev() failed\n"); | 1054 | printk(KNOT_XIRC "register_netdev() failed\n"); |
1058 | link->dev = NULL; | 1055 | link->dev_node = NULL; |
1059 | goto config_error; | 1056 | goto config_error; |
1060 | } | 1057 | } |
1061 | 1058 | ||
@@ -1537,7 +1534,7 @@ static int | |||
1537 | do_open(struct net_device *dev) | 1534 | do_open(struct net_device *dev) |
1538 | { | 1535 | { |
1539 | local_info_t *lp = netdev_priv(dev); | 1536 | local_info_t *lp = netdev_priv(dev); |
1540 | dev_link_t *link = &lp->link; | 1537 | dev_link_t *link = lp->p_dev; |
1541 | 1538 | ||
1542 | DEBUG(0, "do_open(%p)\n", dev); | 1539 | DEBUG(0, "do_open(%p)\n", dev); |
1543 | 1540 | ||
@@ -1867,7 +1864,7 @@ do_stop(struct net_device *dev) | |||
1867 | { | 1864 | { |
1868 | kio_addr_t ioaddr = dev->base_addr; | 1865 | kio_addr_t ioaddr = dev->base_addr; |
1869 | local_info_t *lp = netdev_priv(dev); | 1866 | local_info_t *lp = netdev_priv(dev); |
1870 | dev_link_t *link = &lp->link; | 1867 | dev_link_t *link = lp->p_dev; |
1871 | 1868 | ||
1872 | DEBUG(0, "do_stop(%p)\n", dev); | 1869 | DEBUG(0, "do_stop(%p)\n", dev); |
1873 | 1870 | ||