aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/maps/dc21285.c9
1 files changed, 6 insertions, 3 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
131static void dc21285_copy_to_8(struct map_info *map, unsigned long to, const void *from, ssize_t len) 133static 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}