Commit 1fe87cd0 authored by David Woodhouse's avatar David Woodhouse

Fix some accidental regressions which slipped in with the MTD merge.

 - Unrevert strncpy->strlcpy change in JEDEC chip driver
 - Fix partition handling in physmap map driver
 - Switch sa1100-flash map driver back to rmk's version.
parent 63957aaa
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* not going to guess how to send commands to them, plus I expect they will * not going to guess how to send commands to them, plus I expect they will
* all speak CFI.. * all speak CFI..
* *
* $Id: jedec.c,v 1.18 2003/05/28 12:51:48 dwmw2 Exp $ * $Id: jedec.c,v 1.19 2003/05/29 09:25:23 dwmw2 Exp $
*/ */
#include <linux/init.h> #include <linux/init.h>
...@@ -174,8 +174,7 @@ static struct mtd_info *jedec_probe(struct map_info *map) ...@@ -174,8 +174,7 @@ static struct mtd_info *jedec_probe(struct map_info *map)
/* Generate a part name that includes the number of different chips and /* Generate a part name that includes the number of different chips and
other configuration information */ other configuration information */
count = 1; count = 1;
strncpy(Part,map->name,sizeof(Part)-10); strlcpy(Part,map->name,sizeof(Part)-10);
Part[sizeof(Part)-11] = 0;
strcat(Part," "); strcat(Part," ");
Uniq = 0; Uniq = 0;
for (I = 0; priv->chips[I].jedec != 0 && I < MAX_JEDEC_CHIPS; I++) for (I = 0; priv->chips[I].jedec != 0 && I < MAX_JEDEC_CHIPS; I++)
...@@ -252,8 +251,7 @@ static struct mtd_info *jedec_probe(struct map_info *map) ...@@ -252,8 +251,7 @@ static struct mtd_info *jedec_probe(struct map_info *map)
// printk("Part: '%s'\n",Part); // printk("Part: '%s'\n",Part);
memset(MTD,0,sizeof(*MTD)); memset(MTD,0,sizeof(*MTD));
// strncpy(MTD->name,Part,sizeof(MTD->name)); // strlcpy(MTD->name,Part,sizeof(MTD->name));
// MTD->name[sizeof(MTD->name)-1] = 0;
MTD->name = map->name; MTD->name = map->name;
MTD->type = MTD_NORFLASH; MTD->type = MTD_NORFLASH;
MTD->flags = MTD_CAP_NORFLASH; MTD->flags = MTD_CAP_NORFLASH;
......
/* /*
* $Id: physmap.c,v 1.27 2003/05/21 12:45:19 dwmw2 Exp $ * $Id: physmap.c,v 1.29 2003/05/29 09:24:10 dwmw2 Exp $
* *
* Normal mappings of chips in physical memory * Normal mappings of chips in physical memory
*/ */
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/slab.h>
#include <asm/io.h> #include <asm/io.h>
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/mtd/map.h> #include <linux/mtd/map.h>
...@@ -59,7 +60,7 @@ static struct mtd_partition physmap_partitions[] = { ...@@ -59,7 +60,7 @@ static struct mtd_partition physmap_partitions[] = {
}; };
#define NUM_PARTITIONS (sizeof(physmap_partitions)/sizeof(struct mtd_partition)) #define NUM_PARTITIONS (sizeof(physmap_partitions)/sizeof(struct mtd_partition))
const char *part_probes = {"cmdlinepart", "RedBoot", NULL}; const char *part_probes[] = {"cmdlinepart", "RedBoot", NULL};
#endif /* CONFIG_MTD_PARTITIONS */ #endif /* CONFIG_MTD_PARTITIONS */
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment