mtd/drivers/mtd/devices ramtd.c,1.5,1.6
joern at infradead.org
joern at infradead.org
Tue Mar 7 09:40:35 EST 2006
Update of /home/cvs/mtd/drivers/mtd/devices
In directory phoenix.infradead.org:/home/joern/mtd/drivers/mtd/devices
Modified Files:
ramtd.c
Log Message:
o s/kfree/vfree/ - bug spotted by iSteve and jwb
o make device size configurable at insmod time - by iSteve
Index: ramtd.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/ramtd.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ramtd.c 20 May 2005 15:50:43 -0000 1.5
+++ ramtd.c 7 Mar 2006 14:40:31 -0000 1.6
@@ -21,6 +21,11 @@
static LIST_HEAD(ramtd_list);
static DECLARE_MUTEX(ramtd_mutex);
+static unsigned long ramtd_size = 4*1024*1024;
+
+module_param(ramtd_size, ulong, 0);
+MODULE_PARM_DESC(ramtd_size, "Total device size in bytes");
+
static void *get_pool_page(void)
{
@@ -172,7 +177,7 @@
static int __init ramtd_init(void)
{
- return register_device("ramtd", 4*1024*1024); /* FIXME */
+ return register_device("ramtd", ramtd_size);
}
static void __exit ramtd_exit(void)
@@ -182,7 +187,7 @@
down_interruptible(&ramtd_mutex);
list_for_each_entry_safe(this, next, &ramtd_list, list) {
del_mtd_device(&this->mtd);
- kfree(this);
+ vfree(this);
}
up(&ramtd_mutex);
}
More information about the linux-mtd-cvs
mailing list