summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/pcmcia/sym53c500_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/scsi/pcmcia/sym53c500_cs.c
parent8e9e793d68fcda6cc84c18cedf85ca0f91d801a8 (diff)
[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/scsi/pcmcia/sym53c500_cs.c')
-rw-r--r--drivers/scsi/pcmcia/sym53c500_cs.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c
index c4e3e2294c6..a0f8e2691f9 100644
--- a/drivers/scsi/pcmcia/sym53c500_cs.c
+++ b/drivers/scsi/pcmcia/sym53c500_cs.c
@@ -918,11 +918,6 @@ SYM53C500_event(event_t event, int priority, event_callback_args_t *args)
DEBUG(1, "SYM53C500_event(0x%06x)\n", event);
switch (event) {
- case CS_EVENT_CARD_REMOVAL:
- link->state &= ~DEV_PRESENT;
- if (link->state & DEV_CONFIG)
- SYM53C500_release(link);
- break;
case CS_EVENT_CARD_INSERTION:
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
SYM53C500_config(link);
@@ -932,8 +927,9 @@ SYM53C500_event(event_t event, int priority, event_callback_args_t *args)
} /* SYM53C500_event */
static void
-SYM53C500_detach(dev_link_t *link)
+SYM53C500_detach(struct pcmcia_device *p_dev)
{
+ dev_link_t *link = dev_to_instance(p_dev);
dev_link_t **linkp;
DEBUG(0, "SYM53C500_detach(0x%p)\n", link);
@@ -948,9 +944,6 @@ SYM53C500_detach(dev_link_t *link)
if (link->state & DEV_CONFIG)
SYM53C500_release(link);
- if (link->handle)
- pcmcia_deregister_client(link->handle);
-
/* Unlink device structure, free bits. */
*linkp = link->next;
kfree(link->priv);
@@ -993,7 +986,7 @@ SYM53C500_attach(void)
ret = pcmcia_register_client(&link->handle, &client_reg);
if (ret != 0) {
cs_error(link->handle, RegisterClient, ret);
- SYM53C500_detach(link);
+ SYM53C500_detach(link->handle);
return NULL;
}
@@ -1019,7 +1012,7 @@ static struct pcmcia_driver sym53c500_cs_driver = {
},
.attach = SYM53C500_attach,
.event = SYM53C500_event,
- .detach = SYM53C500_detach,
+ .remove = SYM53C500_detach,
.id_table = sym53c500_ids,
.suspend = sym53c500_suspend,
.resume = sym53c500_resume,