summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wavelan_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2005-11-14 21:23:14 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2006-01-06 00:03:10 +0100
commitcc3b4866bee996c922e875b8c8efe9f0d8803aae (patch)
tree6632837b6986f33566f75ed971cecbdc210e3201 /drivers/net/wireless/wavelan_cs.c
parent8e9e793d68fcda6cc84c18cedf85ca0f91d801a8 (diff)
downloadop-kernel-dev-cc3b4866bee996c922e875b8c8efe9f0d8803aae.zip
op-kernel-dev-cc3b4866bee996c922e875b8c8efe9f0d8803aae.tar.gz
[PATCH] pcmcia: unify detach, REMOVAL_EVENT handlers into one remove callback
Unify the "detach" and REMOVAL_EVENT handlers to one "remove" function. Old functionality is preserved, for the moment. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/wireless/wavelan_cs.c')
-rw-r--r--drivers/net/wireless/wavelan_cs.c31
1 files changed, 5 insertions, 26 deletions
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index 3e35328..255952d 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -4692,7 +4692,7 @@ wavelan_attach(void)
if(ret != 0)
{
cs_error(link->handle, RegisterClient, ret);
- wavelan_detach(link);
+ wavelan_detach(link->handle);
return NULL;
}
@@ -4711,8 +4711,10 @@ wavelan_attach(void)
* is released.
*/
static void
-wavelan_detach(dev_link_t * link)
+wavelan_detach(struct pcmcia_device *p_dev)
{
+ dev_link_t *link = dev_to_instance(p_dev);
+
#ifdef DEBUG_CALLBACK_TRACE
printk(KERN_DEBUG "-> wavelan_detach(0x%p)\n", link);
#endif
@@ -4729,10 +4731,6 @@ wavelan_detach(dev_link_t * link)
wv_pcmcia_release(link);
}
- /* Break the link with Card Services */
- if(link->handle)
- pcmcia_deregister_client(link->handle);
-
/* Remove the interface data from the linked list */
if(dev_list == link)
dev_list = link->next;
@@ -4854,25 +4852,6 @@ wavelan_event(event_t event, /* The event received */
switch(event)
{
- case CS_EVENT_REGISTRATION_COMPLETE:
-#ifdef DEBUG_CONFIG_INFO
- printk(KERN_DEBUG "wavelan_cs: registration complete\n");
-#endif
- break;
-
- case CS_EVENT_CARD_REMOVAL:
- /* Oups ! The card is no more there */
- link->state &= ~DEV_PRESENT;
- if(link->state & DEV_CONFIG)
- {
- /* Accept no more transmissions */
- netif_device_detach(dev);
-
- /* Release the card */
- wv_pcmcia_release(link);
- }
- break;
-
case CS_EVENT_CARD_INSERTION:
/* Reset and configure the card */
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
@@ -4906,7 +4885,7 @@ static struct pcmcia_driver wavelan_driver = {
},
.attach = wavelan_attach,
.event = wavelan_event,
- .detach = wavelan_detach,
+ .remove = wavelan_detach,
.id_table = wavelan_ids,
.suspend = wavelan_suspend,
.resume = wavelan_resume,
OpenPOWER on IntegriCloud