From bd9ba8f40ee30edf31cc0845d8838bc43d172ef3 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Fri, 4 Oct 2013 09:38:53 +0200 Subject: zorro/UAPI: Use proper types (endianness/size) in 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 --- drivers/zorro/zorro.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/zorro/zorro.c') diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c index 450abf1..707c1a5 100644 --- a/drivers/zorro/zorro.c +++ b/drivers/zorro/zorro.c @@ -18,6 +18,7 @@ #include #include +#include #include #include @@ -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; -- cgit v1.1