patch-2.3.99-pre7 linux/drivers/ide/ide-cs.c

Next file: linux/drivers/ide/ide-tape.c
Previous file: linux/drivers/ide/ide-cd.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre6/linux/drivers/ide/ide-cs.c linux/drivers/ide/ide-cs.c
@@ -183,7 +183,6 @@
 static void ide_detach(dev_link_t *link)
 {
     dev_link_t **linkp;
-    long flags;
     int ret;
 
     DEBUG(0, "ide_detach(0x%p)\n", link);
@@ -194,14 +193,7 @@
     if (*linkp == NULL)
 	return;
 
-    save_flags(flags);
-    cli();
-    if (link->state & DEV_RELEASE_PENDING) {
-	del_timer(&link->release);
-	link->state &= ~DEV_RELEASE_PENDING;
-    }
-    restore_flags(flags);
-    
+    del_timer(&link->release);
     if (link->state & DEV_CONFIG)
 	ide_release((u_long)link);
     
@@ -425,11 +417,8 @@
     switch (event) {
     case CS_EVENT_CARD_REMOVAL:
 	link->state &= ~DEV_PRESENT;
-	if (link->state & DEV_CONFIG) {
-	    link->release.expires = jiffies + HZ/20;
-	    link->state |= DEV_RELEASE_PENDING;
-	    add_timer(&link->release);
-	}
+	if (link->state & DEV_CONFIG)
+	    mod_timer(&link->release, jiffies + HZ/20);
 	break;
     case CS_EVENT_CARD_INSERTION:
 	link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;

FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen (who was at: [email protected])