aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/hostap
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-05 04:45:09 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:15:57 -0500
commitfd238232cd0ff4840ae6946bb338502154096d88 (patch)
treed20e8f5871f7cff9d0867a84f6ba088fbffcbe28 /drivers/net/wireless/hostap
parenta78f4dd331a4f6a396eb5849656a4a72a70a56d7 (diff)
[PATCH] pcmcia: embed dev_link_t into struct pcmcia_device
Embed dev_link_t into struct pcmcia_device(), as they basically address the same entity. The actual contents of dev_link_t will be cleaned up step by step. This patch includes a bugfix from and signed-off-by Andrew Morton. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/wireless/hostap')
-rw-r--r--drivers/net/wireless/hostap/hostap_cs.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index 69024bfb5bba..e3095a88745c 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -503,22 +503,11 @@ static struct prism2_helper_functions prism2_pccard_funcs =
503 * initialize dev_link structure, but do not configure the card yet */ 503 * initialize dev_link structure, but do not configure the card yet */
504static int prism2_attach(struct pcmcia_device *p_dev) 504static int prism2_attach(struct pcmcia_device *p_dev)
505{ 505{
506 dev_link_t *link;
507
508 link = kmalloc(sizeof(dev_link_t), GFP_KERNEL);
509 if (link == NULL)
510 return -ENOMEM;
511
512 memset(link, 0, sizeof(dev_link_t));
513
514 PDEBUG(DEBUG_HW, "%s: setting Vcc=33 (constant)\n", dev_info); 506 PDEBUG(DEBUG_HW, "%s: setting Vcc=33 (constant)\n", dev_info);
515 link->conf.IntType = INT_MEMORY_AND_IO; 507 p_dev->conf.IntType = INT_MEMORY_AND_IO;
516
517 link->handle = p_dev;
518 p_dev->instance = link;
519 508
520 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; 509 p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
521 if (prism2_config(link)) 510 if (prism2_config(p_dev))
522 PDEBUG(DEBUG_EXTRA, "prism2_config() failed\n"); 511 PDEBUG(DEBUG_EXTRA, "prism2_config() failed\n");
523 512
524 return 0; 513 return 0;
@@ -546,7 +535,6 @@ static void prism2_detach(struct pcmcia_device *p_dev)
546 prism2_free_local_data(dev); 535 prism2_free_local_data(dev);
547 kfree(hw_priv); 536 kfree(hw_priv);
548 } 537 }
549 kfree(link);
550} 538}
551 539
552 540
@@ -713,7 +701,7 @@ static int prism2_config(dev_link_t *link)
713 local->hw_priv = hw_priv; 701 local->hw_priv = hw_priv;
714 hw_priv->link = link; 702 hw_priv->link = link;
715 strcpy(hw_priv->node.dev_name, dev->name); 703 strcpy(hw_priv->node.dev_name, dev->name);
716 link->dev = &hw_priv->node; 704 link->dev_node = &hw_priv->node;
717 705
718 /* 706 /*
719 * Allocate an interrupt line. Note that this does not assign a 707 * Allocate an interrupt line. Note that this does not assign a