patch-2.4.0-test12 linux/drivers/mtd/map_ram.c
Next file: linux/drivers/mtd/map_rom.c
Previous file: linux/drivers/mtd/ftl.c
Back to the patch index
Back to the overall index
- Lines: 49
- Date:
Mon Dec 11 14:57:58 2000
- Orig file:
v2.4.0-test11/linux/drivers/mtd/map_ram.c
- Orig date:
Sun Nov 19 18:44:09 2000
diff -u --recursive --new-file v2.4.0-test11/linux/drivers/mtd/map_ram.c linux/drivers/mtd/map_ram.c
@@ -1,7 +1,7 @@
/*
* Common code to handle map devices which are simple RAM
* (C) 2000 Red Hat. GPL'd.
- * $Id: map_ram.c,v 1.2 2000/07/03 10:01:38 dwmw2 Exp $
+ * $Id: map_ram.c,v 1.7 2000/12/10 01:39:13 dwmw2 Exp $
*/
#include <linux/module.h>
@@ -29,6 +29,7 @@
* this module is non-zero, i.e. between inter_module_get and
* inter_module_put. Keith Owens <kaos@ocs.com.au> 29 Oct 2000.
*/
+
static struct mtd_info *map_ram_probe(struct map_info *map)
{
struct mtd_info *mtd;
@@ -59,6 +60,7 @@
memset(mtd, 0, sizeof(*mtd));
+ map->im_name = im_name;
map->fldrv_destroy = mapram_nop;
mtd->priv = map;
mtd->name = map->name;
@@ -69,9 +71,9 @@
mtd->read = mapram_read;
mtd->write = mapram_write;
mtd->sync = mapram_nop;
- mtd->im_name = im_name;
mtd->flags = MTD_CAP_RAM | MTD_VOLATILE;
-
+ mtd->erasesize = PAGE_SIZE;
+
return mtd;
}
@@ -114,6 +116,11 @@
{
/* Nothing to see here */
}
+
+#if LINUX_VERSION_CODE < 0x20212 && defined(MODULE)
+#define map_ram_init init_module
+#define map_ram_exit cleanup_module
+#endif
static int __init map_ram_init(void)
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)