patch-2.4.0-prerelease linux/drivers/atm/ambassador.c

Next file: linux/drivers/atm/atmdev_init.c
Previous file: linux/drivers/atm/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test12/linux/drivers/atm/ambassador.c linux/drivers/atm/ambassador.c
@@ -1251,15 +1251,10 @@
     }
   }
   
-  // prevent module unload while sleeping (kmalloc/down)
-  // doing this any earlier would complicate more error return paths
-  MOD_INC_USE_COUNT;
-  
   // get space for our vcc stuff
   vcc = kmalloc (sizeof(amb_vcc), GFP_KERNEL);
   if (!vcc) {
     PRINTK (KERN_ERR, "out of memory!");
-    MOD_DEC_USE_COUNT;
     return -ENOMEM;
   }
   atm_vcc->dev_data = (void *) vcc;
@@ -1425,7 +1420,6 @@
   // say the VPI/VCI is free again
   clear_bit(ATM_VF_ADDR,&atm_vcc->flags);
 
-  MOD_DEC_USE_COUNT;
   return;
 }
 
@@ -1703,7 +1697,8 @@
   close:	amb_close,
   send:		amb_send,
   sg_send:	amb_sg_send,
-  proc_read:	amb_proc_read
+  proc_read:	amb_proc_read,
+  owner:	THIS_MODULE,
 };
 
 /********** housekeeping **********/

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)