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>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include <linux/keyboard.h>
|
||||
|
||||
#include <asm/bootinfo.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/amigahw.h>
|
||||
@@ -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 */
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user