diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-10-04 11:38:53 +0400 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-11-26 14:09:09 +0400 |
commit | bd9ba8f40ee30edf31cc0845d8838bc43d172ef3 (patch) | |
tree | 4c073ce3a53d7cccbc3ac7335854d424faa2c289 /drivers/zorro/zorro.c | |
parent | 986ea58dfb52097999cc388880505fc7a10e4779 (diff) | |
download | linux-bd9ba8f40ee30edf31cc0845d8838bc43d172ef3.tar.xz |
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 @@ #include <linux/platform_device.h> #include <linux/slab.h> +#include <asm/byteorder.h> #include <asm/setup.h> #include <asm/amigahw.h> @@ -161,7 +162,8 @@ static int __init amiga_zorro_probe(struct platform_device *pdev) z = &zorro_autocon[i]; z->rom = zi->rom; - z->id = (z->rom.er_Manufacturer<<16) | (z->rom.er_Product<<8); + z->id = (be16_to_cpu(z->rom.er_Manufacturer) << 16) | + (z->rom.er_Product << 8); if (z->id == ZORRO_PROD_GVP_EPC_BASE) { /* GVP quirk */ unsigned long magic = zi->boardaddr + 0x8000; |