diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-08-07 04:55:03 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-08-07 04:55:03 -0400 |
commit | 4fb8af10d0fd09372d52966b76922b9e82bbc950 (patch) | |
tree | d240e4d40357583e3f3eb228dccf20122a5b31ed /firmware | |
parent | f44f82e8a20b98558486eb14497b2f71c78fa325 (diff) | |
parent | 64a99d2a8c3ed5c4e39f3ae1cc682aa8fd3977fc (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/ihex2fw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/ihex2fw.c b/firmware/ihex2fw.c index 660b191ed75e..8f7fdaa9e010 100644 --- a/firmware/ihex2fw.c +++ b/firmware/ihex2fw.c | |||
@@ -250,19 +250,19 @@ static void file_record(struct ihex_binrec *record) | |||
250 | 250 | ||
251 | static int output_records(int outfd) | 251 | static int output_records(int outfd) |
252 | { | 252 | { |
253 | unsigned char zeroes[5] = {0, 0, 0, 0, 0}; | 253 | unsigned char zeroes[6] = {0, 0, 0, 0, 0, 0}; |
254 | struct ihex_binrec *p = records; | 254 | struct ihex_binrec *p = records; |
255 | 255 | ||
256 | while (p) { | 256 | while (p) { |
257 | uint16_t writelen = (p->len + 9) & ~3; | 257 | uint16_t writelen = (p->len + 9) & ~3; |
258 | 258 | ||
259 | p->addr = htonl(p->addr); | 259 | p->addr = htonl(p->addr); |
260 | p->len = htonl(p->len); | 260 | p->len = htons(p->len); |
261 | write(outfd, &p->addr, writelen); | 261 | write(outfd, &p->addr, writelen); |
262 | p = p->next; | 262 | p = p->next; |
263 | } | 263 | } |
264 | /* EOF record is zero length, since we don't bother to represent | 264 | /* EOF record is zero length, since we don't bother to represent |
265 | the type field in the binary version */ | 265 | the type field in the binary version */ |
266 | write(outfd, zeroes, 5); | 266 | write(outfd, zeroes, 6); |
267 | return 0; | 267 | return 0; |
268 | } | 268 | } |