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

Next file: linux/drivers/mtd/mtdblock.c
Previous file: linux/drivers/mtd/chips/cfi_cmdset_0002.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.13/linux/drivers/mtd/ftl.c linux/drivers/mtd/ftl.c
@@ -235,6 +235,7 @@
 };
 #else
 static struct block_device_operations ftl_blk_fops = {
+    owner:	THIS_MODULE,
     open:	ftl_open,
     release:	ftl_close,
     ioctl:	ftl_ioctl,
@@ -894,16 +895,11 @@
     if (ftl_gendisk.part[minor].nr_sects == 0)
 	return -ENXIO;
 
-    MOD_INC_USE_COUNT;
-
-    if (!get_mtd_device(partition->mtd, -1)) {
-	    MOD_DEC_USE_COUNT;
+    if (!get_mtd_device(partition->mtd, -1))
 	    return /* -E'SBUGGEREDOFF */ -ENXIO;
-    }
-    
+
     if ((file->f_mode & 2) && !(partition->mtd->flags & MTD_CLEAR_BITS) ) {
 	    put_mtd_device(partition->mtd);
-	    MOD_DEC_USE_COUNT;
             return -EROFS;
     }
     
@@ -939,7 +935,6 @@
     atomic_dec(&part->open);
 
     put_mtd_device(part->mtd);
-    MOD_DEC_USE_COUNT;
     release_return(0);
 } /* ftl_close */
 

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