patch-2.4.0-test4 linux/drivers/mtd/mtdchar.c
Next file: linux/drivers/mtd/mtdcore.c
Previous file: linux/drivers/mtd/mtdblock.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Thu Jul 13 10:19:55 2000
- Orig file:
v2.4.0-test3/linux/drivers/mtd/mtdchar.c
- Orig date:
Mon Jul 10 16:47:23 2000
diff -u --recursive --new-file v2.4.0-test3/linux/drivers/mtd/mtdchar.c linux/drivers/mtd/mtdchar.c
@@ -63,21 +63,16 @@
if ((file->f_mode & 2) && (minor & 1))
return -EACCES;
- MOD_INC_USE_COUNT;
-
mtd = get_mtd_device(NULL, devnum);
- if (!mtd) {
- MOD_DEC_USE_COUNT;
+ if (!mtd)
return -ENODEV;
- }
file->private_data = mtd;
/* You can't open it RW if it's not a writeable device */
if ((file->f_mode & 2) && !(mtd->flags & MTD_WRITEABLE)) {
put_mtd_device(mtd);
- MOD_DEC_USE_COUNT;
return -EACCES;
}
@@ -100,7 +95,6 @@
put_mtd_device(mtd);
- MOD_DEC_USE_COUNT;
release_return(0);
} /* mtd_close */
@@ -362,7 +356,7 @@
} /* memory_ioctl */
static struct file_operations mtd_fops = {
-
+ owner: THIS_MODULE,
llseek: mtd_lseek, /* lseek */
read: mtd_read, /* read */
write: mtd_write, /* write */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)