summaryrefslogtreecommitdiff
path: root/drivers/zorro/zorro.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2013-10-04 09:38:53 +0200
committerGeert Uytterhoeven <geert@linux-m68k.org>2013-11-26 11:09:09 +0100
commitbd9ba8f40ee30edf31cc0845d8838bc43d172ef3 (patch)
tree4c073ce3a53d7cccbc3ac7335854d424faa2c289 /drivers/zorro/zorro.c
parent986ea58dfb52097999cc388880505fc7a10e4779 (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.c4
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;