aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/orinoco_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/orinoco_cs.c')
-rw-r--r--drivers/net/wireless/orinoco_cs.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c
index 75981d88a1e..f10d97bc45f 100644
--- a/drivers/net/wireless/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco_cs.c
@@ -49,7 +49,7 @@ MODULE_PARM_DESC(ignore_cis_vcc, "Allow voltage mismatch between card and socket
/* PCMCIA specific device information (goes in the card field of
* struct orinoco_private */
struct orinoco_pccard {
- dev_link_t link;
+ struct pcmcia_device *p_dev;
dev_node_t node;
/* Used to handle hard reset */
@@ -75,7 +75,7 @@ static int
orinoco_cs_hard_reset(struct orinoco_private *priv)
{
struct orinoco_pccard *card = priv->card;
- dev_link_t *link = &card->link;
+ dev_link_t *link = card->p_dev;
int err;
/* We need atomic ops here, because we're not holding the lock */
@@ -109,7 +109,7 @@ orinoco_cs_attach(struct pcmcia_device *p_dev)
struct net_device *dev;
struct orinoco_private *priv;
struct orinoco_pccard *card;
- dev_link_t *link;
+ dev_link_t *link = dev_to_instance(p_dev);
dev = alloc_orinocodev(sizeof(*card), orinoco_cs_hard_reset);
if (! dev)
@@ -118,7 +118,7 @@ orinoco_cs_attach(struct pcmcia_device *p_dev)
card = priv->card;
/* Link both structures together */
- link = &card->link;
+ card->p_dev = p_dev;
link->priv = dev;
/* Interrupt setup */
@@ -135,12 +135,6 @@ orinoco_cs_attach(struct pcmcia_device *p_dev)
link->conf.Attributes = 0;
link->conf.IntType = INT_MEMORY_AND_IO;
- /* Register with Card Services */
- link->next = NULL;
-
- link->handle = p_dev;
- p_dev->instance = link;
-
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
orinoco_cs_config(link);
@@ -161,8 +155,8 @@ static void orinoco_cs_detach(struct pcmcia_device *p_dev)
if (link->state & DEV_CONFIG)
orinoco_cs_release(link);
- DEBUG(0, PFX "detach: link=%p link->dev=%p\n", link, link->dev);
- if (link->dev) {
+ DEBUG(0, PFX "detach: link=%p link->dev_node=%p\n", link, link->dev_node);
+ if (link->dev_node) {
DEBUG(0, PFX "About to unregister net device %p\n",
dev);
unregister_netdev(dev);
@@ -364,9 +358,9 @@ orinoco_cs_config(dev_link_t *link)
}
/* At this point, the dev_node_t structure(s) needs to be
- * initialized and arranged in a linked list at link->dev. */
+ * initialized and arranged in a linked list at link->dev_node. */
strcpy(card->node.dev_name, dev->name);
- link->dev = &card->node; /* link->dev being non-NULL is also
+ link->dev_node = &card->node; /* link->dev_node being non-NULL is also
used to indicate that the
net_device has been registered */
link->state &= ~DEV_CONFIG_PENDING;