mtd/drivers/mtd/devices phram.c,1.3,1.4
joern at infradead.org
joern at infradead.org
Thu Nov 25 08:52:56 EST 2004
Update of /home/cvs/mtd/drivers/mtd/devices
In directory phoenix.infradead.org:/tmp/cvs-serv3184/drivers/mtd/devices
Modified Files:
phram.c
Log Message:
Fix up slram and phram.
Index: phram.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/devices/phram.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- phram.c 16 Nov 2004 18:29:01 -0000 1.3
+++ phram.c 25 Nov 2004 13:52:53 -0000 1.4
@@ -18,6 +18,9 @@
* by "k", "M" or "G", the numbers will be interpreted as kilo, mega or
* gigabytes.
*
+ * Example:
+ * phram=swap,896M,110M phram=test,1006M,1M
+ *
*/
#include <asm/io.h>
@@ -184,7 +187,7 @@
result *= 1024;
case 'k':
result *= 1024;
- endp++;
+ (*endp)++;
}
return result;
}
@@ -235,7 +238,7 @@
uint32_t len;
int i, ret;
- if (strnlen(val, sizeof(str)) >= sizeof(str))
+ if (strnlen(val, sizeof(buf)) >= sizeof(buf))
parse_err("parameter too long\n");
strcpy(str, val);
@@ -283,7 +286,7 @@
if (!val || !val[0])
parse_err("no arguments to \"slram=\"\n");
- if (strnlen(val, sizeof(str)) >= sizeof(str))
+ if (strnlen(val, sizeof(buf)) >= sizeof(buf))
parse_err("parameter too long\n");
strcpy(str, val);
@@ -342,7 +345,6 @@
static int __init init_phram(void)
{
- printk(KERN_ERR "phram loaded\n");
return 0;
}
More information about the linux-mtd-cvs
mailing list