buspirate_spi.c: Drop bp_ prefix for spi data struct members
The name of the struct type already contains bp_ prefix, so
prefix doesn't need to be repeated in members name.
Change-Id: Ia463e3f58497e4b10be072bdd29244f4868098e7
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/54886
Original-Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/72210
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/buspirate_spi.c b/buspirate_spi.c
index 34fabe7..9c29b80 100644
--- a/buspirate_spi.c
+++ b/buspirate_spi.c
@@ -52,8 +52,8 @@
#endif
struct bp_spi_data {
- unsigned char *bp_commbuf;
- int bp_commbufsize;
+ unsigned char *commbuf;
+ int commbufsize;
};
static int buspirate_commbuf_grow(int bufsize, unsigned char **bp_commbuf, int *bp_commbufsize)
@@ -171,7 +171,7 @@
static int buspirate_spi_shutdown(void *data)
{
struct bp_spi_data *bp_data = data;
- unsigned char *const bp_commbuf = bp_data->bp_commbuf;
+ unsigned char *const bp_commbuf = bp_data->commbuf;
int ret = 0, ret2 = 0;
/* No need to allocate a buffer here, we know that bp_commbuf is at least DEFAULT_BUFSIZE big. */
@@ -320,8 +320,8 @@
free(bp_commbuf);
return 1;
}
- bp_data->bp_commbuf = bp_commbuf;
- bp_data->bp_commbufsize = bp_commbufsize;
+ bp_data->commbuf = bp_commbuf;
+ bp_data->commbufsize = bp_commbufsize;
/* This is the brute force version, but it should work.
* It is likely to fail if a previous flashrom run was aborted during a write with the new SPI commands
@@ -423,8 +423,8 @@
ret = ERROR_OOM;
goto init_err_cleanup_exit;
}
- bp_data->bp_commbuf = bp_commbuf;
- bp_data->bp_commbufsize = bp_commbufsize;
+ bp_data->commbuf = bp_commbuf;
+ bp_data->commbufsize = bp_commbufsize;
spi_master_buspirate.max_data_read = 2048;
spi_master_buspirate.max_data_write = 256;
spi_master_buspirate.command = buspirate_spi_send_command_v2;
@@ -437,8 +437,8 @@
ret = ERROR_OOM;
goto init_err_cleanup_exit;
}
- bp_data->bp_commbuf = bp_commbuf;
- bp_data->bp_commbufsize = bp_commbufsize;
+ bp_data->commbuf = bp_commbuf;
+ bp_data->commbufsize = bp_commbufsize;
spi_master_buspirate.max_data_read = 12;
spi_master_buspirate.max_data_write = 12;
spi_master_buspirate.command = buspirate_spi_send_command_v1;
@@ -629,10 +629,10 @@
return SPI_INVALID_LENGTH;
/* 3 bytes extra for CS#, len, CS#. */
- if (buspirate_commbuf_grow(writecnt + readcnt + 3, &bp_data->bp_commbuf, &bp_data->bp_commbufsize))
+ if (buspirate_commbuf_grow(writecnt + readcnt + 3, &bp_data->commbuf, &bp_data->commbufsize))
return ERROR_OOM;
- unsigned char *const bp_commbuf = bp_data->bp_commbuf;
+ unsigned char *const bp_commbuf = bp_data->commbuf;
/* Assert CS# */
bp_commbuf[i++] = 0x02;
@@ -686,10 +686,10 @@
/* 5 bytes extra for command, writelen, readlen.
* 1 byte extra for Ack/Nack.
*/
- if (buspirate_commbuf_grow(max(writecnt + 5, readcnt + 1), &bp_data->bp_commbuf, &bp_data->bp_commbufsize))
+ if (buspirate_commbuf_grow(max(writecnt + 5, readcnt + 1), &bp_data->commbuf, &bp_data->commbufsize))
return ERROR_OOM;
- unsigned char *const bp_commbuf = bp_data->bp_commbuf;
+ unsigned char *const bp_commbuf = bp_data->commbuf;
/* Combined SPI write/read. */
bp_commbuf[i++] = 0x04;