From 4e2fb0ee3ebbdf1f2da6ca1a3937f63eeac647b4 Mon Sep 17 00:00:00 2001 From: Michael Karcher Date: Tue, 12 Jan 2010 23:29:26 +0000 Subject: Don't use "byte" as identifier Some mingw declares a global identifier "byte", causing -Werror -Wshadow to break compilation. This patch renames all identifiers called "byte". Corresponding to flashrom svn r861. Signed-off-by: Michael Karcher Acked-by: Carl-Daniel Hailfinger --- spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spi.c') diff --git a/spi.c b/spi.c index 43dc4bf..952952f 100644 --- a/spi.c +++ b/spi.c @@ -832,7 +832,7 @@ int spi_write_status_register(int status) return result; } -int spi_byte_program(int addr, uint8_t byte) +int spi_byte_program(int addr, uint8_t databyte) { int result; struct spi_command cmds[] = { @@ -843,7 +843,7 @@ int spi_byte_program(int addr, uint8_t byte) .readarr = NULL, }, { .writecnt = JEDEC_BYTE_PROGRAM_OUTSIZE, - .writearr = (const unsigned char[]){ JEDEC_BYTE_PROGRAM, (addr >> 16) & 0xff, (addr >> 8) & 0xff, (addr & 0xff), byte }, + .writearr = (const unsigned char[]){ JEDEC_BYTE_PROGRAM, (addr >> 16) & 0xff, (addr >> 8) & 0xff, (addr & 0xff), databyte }, .readcnt = 0, .readarr = NULL, }, { -- cgit v1.1