FPGA: constify Lattice FPGA code
authorWolfgang Denk <wd@denx.de>
Fri, 5 Aug 2011 02:26:31 +0000 (02:26 +0000)
committerWolfgang Denk <wd@denx.de>
Mon, 5 Sep 2011 09:41:42 +0000 (11:41 +0200)
The Lattice code was missed by commit e6a857d "fpga: constify to fix
build warning" resulting in such warnings:

fpga.c: In function 'fpga_load':
fpga.c:238: warning: passing argument 2 of 'lattice_load' discards qualifiers from pointer target type
fpga.c: In function 'fpga_dump':
fpga.c:278: warning: passing argument 2 of 'lattice_dump' discards qualifiers from pointer target type

Signed-off-by: Wolfgang Denk <wd@denx.de>
cc: Stefano Babic <sbabic@denx.de>

drivers/fpga/lattice.c
include/lattice.h

index c3b2355f9418c840e8727190b8daabec77e99b65..50d9e542d7a4dc454dfff75df2662abf7ab0537e 100644 (file)
@@ -34,7 +34,7 @@
 #include <lattice.h>
 
 static lattice_board_specific_func *pfns;
-static char *fpga_image;
+static const char *fpga_image;
 static unsigned long read_bytes;
 static unsigned long bufsize;
 static unsigned short expectedCRC;
@@ -302,7 +302,7 @@ static int lattice_validate(Lattice_desc *desc, const char *fn)
        return ret_val;
 }
 
-int lattice_load(Lattice_desc *desc, void *buf, size_t bsize)
+int lattice_load(Lattice_desc *desc, const void *buf, size_t bsize)
 {
        int ret_val = FPGA_FAIL;
 
@@ -335,7 +335,7 @@ int lattice_load(Lattice_desc *desc, void *buf, size_t bsize)
        return ret_val;
 }
 
-int lattice_dump(Lattice_desc *desc, void *buf, size_t bsize)
+int lattice_dump(Lattice_desc *desc, const void *buf, size_t bsize)
 {
        puts("Dump not supported for Lattice FPGA\n");
 
index e965663579e6919435327915bd0af23e27d9ffe3..6a2cf93db123a43728c82d67ffe0dc3e7742d617 100755 (executable)
@@ -302,8 +302,8 @@ void sclock(void);
 void ispVMDelay(unsigned short int a_usMicroSecondDelay);
 void calibration(void);
 
-int lattice_load(Lattice_desc *desc, void *buf, size_t bsize);
-int lattice_dump(Lattice_desc *desc, void *buf, size_t bsize);
+int lattice_load(Lattice_desc *desc, const void *buf, size_t bsize);
+int lattice_dump(Lattice_desc *desc, const void *buf, size_t bsize);
 int lattice_info(Lattice_desc *desc);
 
 void ispVMStart(void);