Displaying 1 result from an estimated 1 matches for "dcb_max_num_gpio_entries".
2013 Mar 13
1
Fix unaligned accesses for SPARC
...u/nouveau_bios.h
index 7ccd28f..92031f6 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bios.h
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.h
@@ -26,6 +26,8 @@
#include "nvreg.h"
+#include <asm/unaligned.h>
+
#define DCB_MAX_NUM_ENTRIES 16
#define DCB_MAX_NUM_I2C_ENTRIES 16
#define DCB_MAX_NUM_GPIO_ENTRIES 32
@@ -33,10 +35,10 @@
#define DCB_LOC_ON_CHIP 0
-#define ROM16(x) le16_to_cpu(*(u16 *)&(x))
-#define ROM32(x) le32_to_cpu(*(u32 *)&(x))
+#define ROM16(x) le16_to_cpu(get_unaligned((u16 *)&(x)))
+#define ROM32(x) le32_to_cpu(get_unaligned((u32 *)&(x)))
#define ROM48(x) ({ u8 *p...