diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-10-04 03:38:53 -0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-11-26 05:09:09 -0500 |
commit | bd9ba8f40ee30edf31cc0845d8838bc43d172ef3 (patch) | |
tree | 4c073ce3a53d7cccbc3ac7335854d424faa2c289 /drivers/zorro/zorro.c | |
parent | 986ea58dfb52097999cc388880505fc7a10e4779 (diff) |
zorro/UAPI: Use proper types (endianness/size) in <linux/zorro.h>
Fix member definitions for non-native userspace handling:
- All multi-byte values are big-endian, hence use __be*,
- All pointers are 32-bit pointers under AmigaOS, but unused (except for
cd_BoardAddr) under Linux, hence use __be32.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'drivers/zorro/zorro.c')
-rw-r--r-- | drivers/zorro/zorro.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c index 450abf100f06..707c1a5a0317 100644 --- a/drivers/zorro/zorro.c +++ b/drivers/zorro/zorro.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | 20 | ||
21 | #include <asm/byteorder.h> | ||
21 | #include <asm/setup.h> | 22 | #include <asm/setup.h> |
22 | #include <asm/amigahw.h> | 23 | #include <asm/amigahw.h> |
23 | 24 | ||
@@ -161,7 +162,8 @@ static int __init amiga_zorro_probe(struct platform_device *pdev) | |||
161 | z = &zorro_autocon[i]; | 162 | z = &zorro_autocon[i]; |
162 | 163 | ||
163 | z->rom = zi->rom; | 164 | z->rom = zi->rom; |
164 | z->id = (z->rom.er_Manufacturer<<16) | (z->rom.er_Product<<8); | 165 | z->id = (be16_to_cpu(z->rom.er_Manufacturer) << 16) | |
166 | (z->rom.er_Product << 8); | ||
165 | if (z->id == ZORRO_PROD_GVP_EPC_BASE) { | 167 | if (z->id == ZORRO_PROD_GVP_EPC_BASE) { |
166 | /* GVP quirk */ | 168 | /* GVP quirk */ |
167 | unsigned long magic = zi->boardaddr + 0x8000; | 169 | unsigned long magic = zi->boardaddr + 0x8000; |