mtd/drivers/mtd mtdcore.c,1.40,1.41
David Woodhouse
dwmw2 at infradead.org
Mon Jul 12 11:12:04 EDT 2004
Update of /home/cvs/mtd/drivers/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv25019
Modified Files:
mtdcore.c
Log Message:
Remove 2.2 compatibility.
Index: mtdcore.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/mtdcore.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- mtdcore.c 12 Jul 2004 13:04:25 -0000 1.40
+++ mtdcore.c 12 Jul 2004 15:12:02 -0000 1.41
@@ -334,10 +334,7 @@
/* Support for /proc/mtd */
#ifdef CONFIG_PROC_FS
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
static struct proc_dir_entry *proc_mtd;
-#endif
static inline int mtd_proc_info (char *buf, int i)
{
@@ -350,13 +347,8 @@
this->erasesize, this->name);
}
-static int mtd_read_proc ( char *page, char **start, off_t off,int count
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
- ,int *eof, void *data_unused
-#else
- ,int unused
-#endif
- )
+static int mtd_read_proc (char *page, char **start, off_t off, int count,
+ int *eof, void *data_unused)
{
int len, l, i;
off_t begin = 0;
@@ -376,9 +368,7 @@
}
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
*eof = 1;
-#endif
done:
up(&mtd_table_mutex);
@@ -388,18 +378,6 @@
return ((count < begin+len-off) ? count : begin+len-off);
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)
-struct proc_dir_entry mtd_proc_entry = {
- 0, /* low_ino: the inode -- dynamic */
- 3, "mtd", /* len of name and name */
- S_IFREG | S_IRUGO, /* mode */
- 1, 0, 0, /* nlinks, owner, group */
- 0, NULL, /* size - unused; operations -- use default */
- &mtd_read_proc, /* function used to read data */
- /* nothing more */
- };
-#endif
-
#endif /* CONFIG_PROC_FS */
/*====================================================================*/
@@ -408,16 +386,8 @@
int __init init_mtd(void)
{
#ifdef CONFIG_PROC_FS
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
if ((proc_mtd = create_proc_entry( "mtd", 0, NULL )))
- proc_mtd->read_proc = mtd_read_proc;
-#else
- proc_register_dynamic(&proc_root,&mtd_proc_entry);
-#endif
-#endif
-
-#if LINUX_VERSION_CODE < 0x20212
- init_mtd_devices();
+ proc_mtd->read_proc = mtd_read_proc;
#endif
#ifdef CONFIG_PM
@@ -436,14 +406,9 @@
#endif
#ifdef CONFIG_PROC_FS
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
if (proc_mtd)
- remove_proc_entry( "mtd", NULL);
-#else
- proc_unregister(&proc_root,mtd_proc_entry.low_ino);
+ remove_proc_entry( "mtd", NULL);
#endif
-#endif
-}
module_init(init_mtd);
module_exit(cleanup_mtd);
More information about the linux-mtd-cvs
mailing list