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 --- arch/m68k/amiga/config.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'arch/m68k/amiga/config.c') diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c index acd9c1640cfc..65b5e937ebba 100644 --- a/arch/m68k/amiga/config.c +++ b/arch/m68k/amiga/config.c @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -176,10 +177,10 @@ int __init amiga_parse_bootinfo(const struct bi_record *record) const struct ConfigDev *cd = (struct ConfigDev *)data; struct zorro_dev_init *dev = &zorro_autocon_init[zorro_num_autocon++]; dev->rom = cd->cd_Rom; - dev->slotaddr = cd->cd_SlotAddr; - dev->slotsize = cd->cd_SlotSize; - dev->boardaddr = (u32)cd->cd_BoardAddr; - dev->boardsize = cd->cd_BoardSize; + dev->slotaddr = be16_to_cpu(cd->cd_SlotAddr); + dev->slotsize = be16_to_cpu(cd->cd_SlotSize); + dev->boardaddr = be32_to_cpu(cd->cd_BoardAddr); + dev->boardsize = be32_to_cpu(cd->cd_BoardSize); } else printk("amiga_parse_bootinfo: too many AutoConfig devices\n"); #endif /* CONFIG_ZORRO */ -- cgit v1.2.3