[PATCH] Removal of MOD_{INC,DEC}_USE_COUNT in ide-cs

Pavel Roskin proski at gnu.org
Mon Apr 19 00:08:32 BST 2004


Hello!

The "ide-cs" module cannot be unloaded because it used obsolete
MOD_INC_USE_COUNT and MOD_DEC_USE_COUNT macros.  In fact, they are not
needed in 2.6 kernel.  The generic PCMCIA code already increases use count
for every device served by the driver, so it's impossible to unload the
ide-cs driver while it's in use.

-- 
Regards,
Pavel Roskin
-------------- next part --------------
--- linux.orig/drivers/ide/legacy/ide-cs.c
+++ linux/drivers/ide/legacy/ide-cs.c
@@ -362,7 +362,6 @@ void ide_config(dev_link_t *link)
 	goto failed;
     }
 
-    MOD_INC_USE_COUNT;
     info->ndev = 1;
     sprintf(info->node.dev_name, "hd%c", 'a'+(hd*2));
     info->node.major = ide_major[hd];
@@ -408,7 +407,6 @@ void ide_release(dev_link_t *link)
 	if (link->io.NumPorts2)
 	    request_region(link->io.BasePort2, link->io.NumPorts2,
 			   info->node.dev_name);
-	MOD_DEC_USE_COUNT;
     }
     info->ndev = 0;
     link->dev = NULL;


More information about the linux-pcmcia mailing list