Commit fb2d6efbf298db3660a2130074b8b20a0ff26efd

Authored by Wolfgang Denk
1 parent f0e494988f

FPGA: constify Lattice FPGA code

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>

Showing 2 changed files with 5 additions and 5 deletions Side-by-side Diff

drivers/fpga/lattice.c
... ... @@ -34,7 +34,7 @@
34 34 #include <lattice.h>
35 35  
36 36 static lattice_board_specific_func *pfns;
37   -static char *fpga_image;
  37 +static const char *fpga_image;
38 38 static unsigned long read_bytes;
39 39 static unsigned long bufsize;
40 40 static unsigned short expectedCRC;
... ... @@ -302,7 +302,7 @@
302 302 return ret_val;
303 303 }
304 304  
305   -int lattice_load(Lattice_desc *desc, void *buf, size_t bsize)
  305 +int lattice_load(Lattice_desc *desc, const void *buf, size_t bsize)
306 306 {
307 307 int ret_val = FPGA_FAIL;
308 308  
... ... @@ -335,7 +335,7 @@
335 335 return ret_val;
336 336 }
337 337  
338   -int lattice_dump(Lattice_desc *desc, void *buf, size_t bsize)
  338 +int lattice_dump(Lattice_desc *desc, const void *buf, size_t bsize)
339 339 {
340 340 puts("Dump not supported for Lattice FPGA\n");
341 341  
... ... @@ -302,8 +302,8 @@
302 302 void ispVMDelay(unsigned short int a_usMicroSecondDelay);
303 303 void calibration(void);
304 304  
305   -int lattice_load(Lattice_desc *desc, void *buf, size_t bsize);
306   -int lattice_dump(Lattice_desc *desc, void *buf, size_t bsize);
  305 +int lattice_load(Lattice_desc *desc, const void *buf, size_t bsize);
  306 +int lattice_dump(Lattice_desc *desc, const void *buf, size_t bsize);
307 307 int lattice_info(Lattice_desc *desc);
308 308  
309 309 void ispVMStart(void);