diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-04 20:03:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-04 20:03:56 -0400 |
commit | c635fd3d3de9dec4729135add72c2ff32595605b (patch) | |
tree | 9617681bd52cf63ae0797acc1ab13aefca2ed7d7 | |
parent | 82e68f7ffec3800425f2391c8c86277606860442 (diff) | |
parent | cf368d2f9aced8adc8bd6b1f04294a71551d5fce (diff) |
Merge git://git.infradead.org/users/dwmw2/random-2.6
* git://git.infradead.org/users/dwmw2/random-2.6:
drivers/video/console/promcon.c: fix build error
Fix IHEX firmware generation/loading
-rw-r--r-- | firmware/ihex2fw.c | 6 | ||||
-rw-r--r-- | include/linux/ihex.h | 2 | ||||
-rw-r--r-- | include/linux/vt_kern.h | 1 |
3 files changed, 5 insertions, 4 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 | } |
diff --git a/include/linux/ihex.h b/include/linux/ihex.h index 2baace2788a7..31d8629e75a1 100644 --- a/include/linux/ihex.h +++ b/include/linux/ihex.h | |||
@@ -18,7 +18,7 @@ struct ihex_binrec { | |||
18 | __be32 addr; | 18 | __be32 addr; |
19 | __be16 len; | 19 | __be16 len; |
20 | uint8_t data[0]; | 20 | uint8_t data[0]; |
21 | } __attribute__((aligned(4))); | 21 | } __attribute__((packed)); |
22 | 22 | ||
23 | /* Find the next record, taking into account the 4-byte alignment */ | 23 | /* Find the next record, taking into account the 4-byte alignment */ |
24 | static inline const struct ihex_binrec * | 24 | static inline const struct ihex_binrec * |
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h index 8c8119ffee12..1c78d56c57e5 100644 --- a/include/linux/vt_kern.h +++ b/include/linux/vt_kern.h | |||
@@ -86,6 +86,7 @@ int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc); | |||
86 | #define con_copy_unimap(d, s) (0) | 86 | #define con_copy_unimap(d, s) (0) |
87 | #define con_get_unimap(vc, ct, uct, list) (-EINVAL) | 87 | #define con_get_unimap(vc, ct, uct, list) (-EINVAL) |
88 | #define con_free_unimap(vc) do { ; } while (0) | 88 | #define con_free_unimap(vc) do { ; } while (0) |
89 | #define con_protect_unimap(vc, rdonly) do { ; } while (0) | ||
89 | 90 | ||
90 | #define vc_translate(vc, c) (c) | 91 | #define vc_translate(vc, c) (c) |
91 | #endif | 92 | #endif |