diff options
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/maps/dc21285.c | 9 | ||||
-rw-r--r-- | drivers/mtd/maps/tsunami_flash.c | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/mtd/maps/dc21285.c b/drivers/mtd/maps/dc21285.c index 701620b6baed..8b3784e2de89 100644 --- a/drivers/mtd/maps/dc21285.c +++ b/drivers/mtd/maps/dc21285.c | |||
@@ -110,8 +110,9 @@ static void dc21285_copy_to_32(struct map_info *map, unsigned long to, const voi | |||
110 | { | 110 | { |
111 | while (len > 0) { | 111 | while (len > 0) { |
112 | map_word d; | 112 | map_word d; |
113 | d.x[0] = *((uint32_t*)from)++; | 113 | d.x[0] = *((uint32_t*)from); |
114 | dc21285_write32(map, d, to); | 114 | dc21285_write32(map, d, to); |
115 | from += 4; | ||
115 | to += 4; | 116 | to += 4; |
116 | len -= 4; | 117 | len -= 4; |
117 | } | 118 | } |
@@ -121,8 +122,9 @@ static void dc21285_copy_to_16(struct map_info *map, unsigned long to, const voi | |||
121 | { | 122 | { |
122 | while (len > 0) { | 123 | while (len > 0) { |
123 | map_word d; | 124 | map_word d; |
124 | d.x[0] = *((uint16_t*)from)++; | 125 | d.x[0] = *((uint16_t*)from); |
125 | dc21285_write16(map, d, to); | 126 | dc21285_write16(map, d, to); |
127 | from += 2; | ||
126 | to += 2; | 128 | to += 2; |
127 | len -= 2; | 129 | len -= 2; |
128 | } | 130 | } |
@@ -131,8 +133,9 @@ static void dc21285_copy_to_16(struct map_info *map, unsigned long to, const voi | |||
131 | static void dc21285_copy_to_8(struct map_info *map, unsigned long to, const void *from, ssize_t len) | 133 | static void dc21285_copy_to_8(struct map_info *map, unsigned long to, const void *from, ssize_t len) |
132 | { | 134 | { |
133 | map_word d; | 135 | map_word d; |
134 | d.x[0] = *((uint8_t*)from)++; | 136 | d.x[0] = *((uint8_t*)from); |
135 | dc21285_write8(map, d, to); | 137 | dc21285_write8(map, d, to); |
138 | from++; | ||
136 | to++; | 139 | to++; |
137 | len--; | 140 | len--; |
138 | } | 141 | } |
diff --git a/drivers/mtd/maps/tsunami_flash.c b/drivers/mtd/maps/tsunami_flash.c index 9e21e6c02f80..0f915ac3102e 100644 --- a/drivers/mtd/maps/tsunami_flash.c +++ b/drivers/mtd/maps/tsunami_flash.c | |||
@@ -62,7 +62,7 @@ static void tsunami_flash_copy_to( | |||
62 | static struct map_info tsunami_flash_map = { | 62 | static struct map_info tsunami_flash_map = { |
63 | .name = "flash chip on the Tsunami TIG bus", | 63 | .name = "flash chip on the Tsunami TIG bus", |
64 | .size = MAX_TIG_FLASH_SIZE, | 64 | .size = MAX_TIG_FLASH_SIZE, |
65 | .phys = NO_XIP; | 65 | .phys = NO_XIP, |
66 | .bankwidth = 1, | 66 | .bankwidth = 1, |
67 | .read = tsunami_flash_read8, | 67 | .read = tsunami_flash_read8, |
68 | .copy_from = tsunami_flash_copy_from, | 68 | .copy_from = tsunami_flash_copy_from, |