fpga: zynq: Remove sparse warnings
[oweals/u-boot.git] / drivers / fpga / zynqpl.c
index 15900c9ef262eb0f498a59b4a598672f67430958..0a134e524c4452088cbb82dc716949e28b74e148 100644 (file)
@@ -10,7 +10,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <zynqpl.h>
-#include <asm/sizes.h>
+#include <linux/sizes.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 
@@ -36,7 +36,7 @@
 #define CONFIG_SYS_FPGA_PROG_TIME      (CONFIG_SYS_HZ * 4) /* 4 s */
 #endif
 
-int zynq_info(Xilinx_desc *desc)
+static int zynq_info(xilinx_desc *desc)
 {
        return FPGA_SUCCESS;
 }
@@ -147,13 +147,12 @@ static void *check_data(u8 *buf, size_t bsize, u32 *swap)
                }
                /* Loop can be huge - support CTRL + C */
                if (ctrlc())
-                       return 0;
+                       return NULL;
        }
-       return 0;
+       return NULL;
 }
 
-
-int zynq_load(Xilinx_desc *desc, const void *buf, size_t bsize)
+static int zynq_load(xilinx_desc *desc, const void *buf, size_t bsize)
 {
        unsigned long ts; /* Timestamp */
        u32 partialbit = 0;
@@ -358,7 +357,13 @@ int zynq_load(Xilinx_desc *desc, const void *buf, size_t bsize)
        return FPGA_SUCCESS;
 }
 
-int zynq_dump(Xilinx_desc *desc, const void *buf, size_t bsize)
+static int zynq_dump(xilinx_desc *desc, const void *buf, size_t bsize)
 {
        return FPGA_FAIL;
 }
+
+struct xilinx_fpga_op zynq_op = {
+       .load = zynq_load,
+       .dump = zynq_dump,
+       .info = zynq_info,
+};