summaryrefslogtreecommitdiff
path: root/arch/m68k/amiga/platform.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2013-10-04 11:38:53 +0400
committerGeert Uytterhoeven <geert@linux-m68k.org>2013-11-26 14:09:09 +0400
commitbd9ba8f40ee30edf31cc0845d8838bc43d172ef3 (patch)
tree4c073ce3a53d7cccbc3ac7335854d424faa2c289 /arch/m68k/amiga/platform.c
parent986ea58dfb52097999cc388880505fc7a10e4779 (diff)
downloadlinux-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 'arch/m68k/amiga/platform.c')
-rw-r--r--arch/m68k/amiga/platform.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/m68k/amiga/platform.c b/arch/m68k/amiga/platform.c
index 7847b2b1b5b6..d34029d7b058 100644
--- a/arch/m68k/amiga/platform.c
+++ b/arch/m68k/amiga/platform.c
@@ -13,6 +13,7 @@
#include <asm/amigahw.h>
#include <asm/amigayle.h>
+#include <asm/byteorder.h>
#ifdef CONFIG_ZORRO
@@ -66,10 +67,12 @@ static int __init z_dev_present(zorro_id id)
{
unsigned int i;
- for (i = 0; i < zorro_num_autocon; i++)
- if (zorro_autocon_init[i].rom.er_Manufacturer == ZORRO_MANUF(id) &&
- zorro_autocon_init[i].rom.er_Product == ZORRO_PROD(id))
+ for (i = 0; i < zorro_num_autocon; i++) {
+ const struct ExpansionRom *rom = &zorro_autocon_init[i].rom;
+ if (be16_to_cpu(rom->er_Manufacturer) == ZORRO_MANUF(id) &&
+ rom->er_Product == ZORRO_PROD(id))
return 1;
+ }
return 0;
}