patch-2.4.14 linux/drivers/mtd/mtdblock.c

Next file: linux/drivers/mtd/mtdblock_ro.c
Previous file: linux/drivers/mtd/ftl.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.13/linux/drivers/mtd/mtdblock.c linux/drivers/mtd/mtdblock.c
@@ -295,8 +295,6 @@
 		return -ENODEV;
 	}
 	
-	MOD_INC_USE_COUNT;
-
 	spin_lock(&mtdblks_lock);
 
 	/* If it's already open, no need to piss about. */
@@ -316,7 +314,6 @@
 	mtdblk = kmalloc(sizeof(struct mtdblk_dev), GFP_KERNEL);
 	if (!mtdblk) {
 		put_mtd_device(mtd);
-		MOD_DEC_USE_COUNT;
 		return -ENOMEM;
 	}
 	memset(mtdblk, 0, sizeof(*mtdblk));
@@ -332,7 +329,6 @@
 		if (!mtdblk->cache_data) {
 			put_mtd_device(mtdblk->mtd);
 			kfree(mtdblk);
-			MOD_DEC_USE_COUNT;
 			return -ENOMEM;
 		}
 	}
@@ -400,7 +396,6 @@
 
 	DEBUG(MTD_DEBUG_LEVEL1, "ok\n");
 
-	MOD_DEC_USE_COUNT;
 	release_return(0);
 }  
 
@@ -574,6 +569,7 @@
 #else
 static struct block_device_operations mtd_fops = 
 {
+	owner: THIS_MODULE,
 	open: mtdblock_open,
 	release: mtdblock_release,
 	ioctl: mtdblock_ioctl

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