aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r--drivers/mtd/devices/Kconfig5
-rw-r--r--drivers/mtd/devices/block2mtd.c11
-rw-r--r--drivers/mtd/devices/docprobe.c6
-rw-r--r--drivers/mtd/devices/phram.c14
4 files changed, 24 insertions, 12 deletions
diff --git a/drivers/mtd/devices/Kconfig b/drivers/mtd/devices/Kconfig
index 6e9f880e2f98..16c02b5ccf7e 100644
--- a/drivers/mtd/devices/Kconfig
+++ b/drivers/mtd/devices/Kconfig
@@ -47,6 +47,11 @@ config MTD_MS02NV
47 accelerator. Say Y here if you have a DECstation 5000/2x0 or a 47 accelerator. Say Y here if you have a DECstation 5000/2x0 or a
48 DECsystem 5900 equipped with such a module. 48 DECsystem 5900 equipped with such a module.
49 49
50 If you want to compile this driver as a module ( = code which can be
51 inserted in and removed from the running kernel whenever you want),
52 say M here and read <file:Documentation/modules.txt>. The module will
53 be called ms02-nv.o.
54
50config MTD_DATAFLASH 55config MTD_DATAFLASH
51 tristate "Support for AT45xxx DataFlash" 56 tristate "Support for AT45xxx DataFlash"
52 depends on MTD && SPI_MASTER && EXPERIMENTAL 57 depends on MTD && SPI_MASTER && EXPERIMENTAL
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
index f54e4bf9b968..8ca04f4e03f0 100644
--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -4,7 +4,7 @@
4 * block2mtd.c - create an mtd from a block device 4 * block2mtd.c - create an mtd from a block device
5 * 5 *
6 * Copyright (C) 2001,2002 Simon Evans <spse@secret.org.uk> 6 * Copyright (C) 2001,2002 Simon Evans <spse@secret.org.uk>
7 * Copyright (C) 2004-2006 Jrn Engel <joern@wh.fh-wedel.de> 7 * Copyright (C) 2004-2006 Jรถrn Engel <joern@wh.fh-wedel.de>
8 * 8 *
9 * Licence: GPL 9 * Licence: GPL
10 */ 10 */
@@ -429,7 +429,8 @@ static inline void kill_final_newline(char *str)
429 429
430static int block2mtd_setup(const char *val, struct kernel_param *kp) 430static int block2mtd_setup(const char *val, struct kernel_param *kp)
431{ 431{
432 char buf[80+12], *str=buf; /* 80 for device, 12 for erase size */ 432 char buf[80+12]; /* 80 for device, 12 for erase size */
433 char *str = buf;
433 char *token[2]; 434 char *token[2];
434 char *name; 435 char *name;
435 size_t erase_size = PAGE_SIZE; 436 size_t erase_size = PAGE_SIZE;
@@ -441,7 +442,7 @@ static int block2mtd_setup(const char *val, struct kernel_param *kp)
441 strcpy(str, val); 442 strcpy(str, val);
442 kill_final_newline(str); 443 kill_final_newline(str);
443 444
444 for (i=0; i<2; i++) 445 for (i = 0; i < 2; i++)
445 token[i] = strsep(&str, ","); 446 token[i] = strsep(&str, ",");
446 447
447 if (str) 448 if (str)
@@ -460,8 +461,10 @@ static int block2mtd_setup(const char *val, struct kernel_param *kp)
460 461
461 if (token[1]) { 462 if (token[1]) {
462 ret = parse_num(&erase_size, token[1]); 463 ret = parse_num(&erase_size, token[1]);
463 if (ret) 464 if (ret) {
465 kfree(name);
464 parse_err("illegal erase size"); 466 parse_err("illegal erase size");
467 }
465 } 468 }
466 469
467 add_device(name, erase_size); 470 add_device(name, erase_size);
diff --git a/drivers/mtd/devices/docprobe.c b/drivers/mtd/devices/docprobe.c
index 32f1d332f5b5..42ec08416a60 100644
--- a/drivers/mtd/devices/docprobe.c
+++ b/drivers/mtd/devices/docprobe.c
@@ -231,21 +231,21 @@ static inline int __init doccheck(void __iomem *potential, unsigned long physadr
231 231
232static int docfound; 232static int docfound;
233 233
234#ifdef CONFIG_DOC2000 234#ifdef CONFIG_MTD_DOC2000
235extern void DoC2k_init(struct mtd_info *); 235extern void DoC2k_init(struct mtd_info *);
236#define doc2k_initfunc (&DoC2k_init) 236#define doc2k_initfunc (&DoC2k_init)
237#else 237#else
238#define doc2k_initfunc NULL 238#define doc2k_initfunc NULL
239#endif 239#endif
240 240
241#ifdef CONFIG_DOC2001 241#ifdef CONFIG_MTD_DOC2001
242extern void DoCMil_init(struct mtd_info *); 242extern void DoCMil_init(struct mtd_info *);
243#define docmil_initfunc (&DoCMil_init) 243#define docmil_initfunc (&DoCMil_init)
244#else 244#else
245#define docmil_initfunc NULL 245#define docmil_initfunc NULL
246#endif 246#endif
247 247
248#ifdef CONFIG_DOC2001PLUS 248#ifdef CONFIG_MTD_DOC2001PLUS
249extern void DoCMilPlus_init(struct mtd_info *); 249extern void DoCMilPlus_init(struct mtd_info *);
250#define docmplus_initfunc (&DoCMilPlus_init) 250#define docmplus_initfunc (&DoCMilPlus_init)
251#else 251#else
diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
index 41af9693d880..e09e416667d3 100644
--- a/drivers/mtd/devices/phram.c
+++ b/drivers/mtd/devices/phram.c
@@ -1,8 +1,8 @@
1/** 1/**
2 * $Id: phram.c,v 1.16 2005/11/07 11:14:25 gleixner Exp $ 2 * $Id: phram.c,v 1.16 2005/11/07 11:14:25 gleixner Exp $
3 * 3 *
4 * Copyright (c) ???? Jochen Schuble <psionic@psionic.de> 4 * Copyright (c) ???? Jochen Schรคuble <psionic@psionic.de>
5 * Copyright (c) 2003-2004 Jrn Engel <joern@wh.fh-wedel.de> 5 * Copyright (c) 2003-2004 Jรถrn Engel <joern@wh.fh-wedel.de>
6 * 6 *
7 * Usage: 7 * Usage:
8 * 8 *
@@ -266,12 +266,16 @@ static int phram_setup(const char *val, struct kernel_param *kp)
266 return 0; 266 return 0;
267 267
268 ret = parse_num32(&start, token[1]); 268 ret = parse_num32(&start, token[1]);
269 if (ret) 269 if (ret) {
270 kfree(name);
270 parse_err("illegal start address\n"); 271 parse_err("illegal start address\n");
272 }
271 273
272 ret = parse_num32(&len, token[2]); 274 ret = parse_num32(&len, token[2]);
273 if (ret) 275 if (ret) {
276 kfree(name);
274 parse_err("illegal device length\n"); 277 parse_err("illegal device length\n");
278 }
275 279
276 register_device(name, start, len); 280 register_device(name, start, len);
277 281
@@ -296,5 +300,5 @@ module_init(init_phram);
296module_exit(cleanup_phram); 300module_exit(cleanup_phram);
297 301
298MODULE_LICENSE("GPL"); 302MODULE_LICENSE("GPL");
299MODULE_AUTHOR("Jrn Engel <joern@wh.fh-wedel.de>"); 303MODULE_AUTHOR("Jรถrn Engel <joern@wh.fh-wedel.de>");
300MODULE_DESCRIPTION("MTD driver for physical RAM"); 304MODULE_DESCRIPTION("MTD driver for physical RAM");