aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2008-02-03 02:29:41 -0500
committerDavid Woodhouse <dwmw2@infradead.org>2008-02-03 02:30:32 -0500
commitc1f3ee120bb61045b1c0a3ead620d1d65af47130 (patch)
tree908430bf2b47fe8e96ac623ae7ab6dd5698d0938 /drivers/mtd
parente619a75ff6201b567a539e787aa9af9bc63a3187 (diff)
parent9135f1901ee6449dfe338adf6e40e9c2025b8150 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0001.c7
-rw-r--r--drivers/mtd/mtdchar.c12
2 files changed, 10 insertions, 9 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
index 8189adfefaef..47794d23a42e 100644
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -1568,9 +1568,12 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
1568 int ret, wbufsize, word_gap, words; 1568 int ret, wbufsize, word_gap, words;
1569 const struct kvec *vec; 1569 const struct kvec *vec;
1570 unsigned long vec_seek; 1570 unsigned long vec_seek;
1571 unsigned long initial_adr;
1572 int initial_len = len;
1571 1573
1572 wbufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize; 1574 wbufsize = cfi_interleave(cfi) << cfi->cfiq->MaxBufWriteSize;
1573 adr += chip->start; 1575 adr += chip->start;
1576 initial_adr = adr;
1574 cmd_adr = adr & ~(wbufsize-1); 1577 cmd_adr = adr & ~(wbufsize-1);
1575 1578
1576 /* Let's determine this according to the interleave only once */ 1579 /* Let's determine this according to the interleave only once */
@@ -1583,7 +1586,7 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
1583 return ret; 1586 return ret;
1584 } 1587 }
1585 1588
1586 XIP_INVAL_CACHED_RANGE(map, adr, len); 1589 XIP_INVAL_CACHED_RANGE(map, initial_adr, initial_len);
1587 ENABLE_VPP(map); 1590 ENABLE_VPP(map);
1588 xip_disable(map, chip, cmd_adr); 1591 xip_disable(map, chip, cmd_adr);
1589 1592
@@ -1674,7 +1677,7 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip,
1674 chip->state = FL_WRITING; 1677 chip->state = FL_WRITING;
1675 1678
1676 ret = INVAL_CACHE_AND_WAIT(map, chip, cmd_adr, 1679 ret = INVAL_CACHE_AND_WAIT(map, chip, cmd_adr,
1677 adr, len, 1680 initial_adr, initial_len,
1678 chip->buffer_write_time); 1681 chip->buffer_write_time);
1679 if (ret) { 1682 if (ret) {
1680 map_write(map, CMD(0x70), cmd_adr); 1683 map_write(map, CMD(0x70), cmd_adr);
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index b42553cd9af5..5d3ac512ce16 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -27,12 +27,10 @@ static void mtd_notify_add(struct mtd_info* mtd)
27 if (!mtd) 27 if (!mtd)
28 return; 28 return;
29 29
30 class_device_create(mtd_class, NULL, MKDEV(MTD_CHAR_MAJOR, mtd->index*2), 30 device_create(mtd_class, NULL, MKDEV(MTD_CHAR_MAJOR, mtd->index*2), "mtd%d", mtd->index);
31 NULL, "mtd%d", mtd->index);
32 31
33 class_device_create(mtd_class, NULL, 32 device_create(mtd_class, NULL,
34 MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1), 33 MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1), "mtd%dro", mtd->index);
35 NULL, "mtd%dro", mtd->index);
36} 34}
37 35
38static void mtd_notify_remove(struct mtd_info* mtd) 36static void mtd_notify_remove(struct mtd_info* mtd)
@@ -40,8 +38,8 @@ static void mtd_notify_remove(struct mtd_info* mtd)
40 if (!mtd) 38 if (!mtd)
41 return; 39 return;
42 40
43 class_device_destroy(mtd_class, MKDEV(MTD_CHAR_MAJOR, mtd->index*2)); 41 device_destroy(mtd_class, MKDEV(MTD_CHAR_MAJOR, mtd->index*2));
44 class_device_destroy(mtd_class, MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1)); 42 device_destroy(mtd_class, MKDEV(MTD_CHAR_MAJOR, mtd->index*2+1));
45} 43}
46 44
47static struct mtd_notifier notifier = { 45static struct mtd_notifier notifier = {