瀏覽代碼

[MIPS] Ocelot 3: Fix large number of warnings.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Ralf Baechle 18 年之前
父節點
當前提交
d19f7befe9
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      arch/mips/momentum/ocelot_3/ocelot_3_fpga.h

+ 4 - 2
arch/mips/momentum/ocelot_3/ocelot_3_fpga.h

@@ -51,7 +51,9 @@
 
 extern unsigned long ocelot_fpga_base;
 
-#define OCELOT_FPGA_WRITE(x, y) writeb(x, ocelot_fpga_base + OCELOT_3_REG_##y)
-#define OCELOT_FPGA_READ(x) readb(ocelot_fpga_base + OCELOT_3_REG_##x)
+#define __FPGA_REG_TO_ADDR(reg)						\
+	((void *) ocelot_fpga_base + OCELOT_3_REG_##reg)
+#define OCELOT_FPGA_WRITE(x, reg) writeb(x, __FPGA_REG_TO_ADDR(reg))
+#define OCELOT_FPGA_READ(reg) readb(__FPGA_REG_TO_ADDR(reg))
 
 #endif