Random whitespace and coding-style fixes
Also, indentation fixes, e.g. due to conversion to msg_*, use ARRAY_SIZE
where possible, wrap overly long line, etc.
Compile-tested. There should be no functional changes.
Corresponding to flashrom svn r1397.
Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
diff --git a/buspirate_spi.c b/buspirate_spi.c
index f872309..467d271 100644
--- a/buspirate_spi.c
+++ b/buspirate_spi.c
@@ -50,7 +50,8 @@
#define sp_flush_incoming(...) 0
#endif
-static int buspirate_sendrecv(unsigned char *buf, unsigned int writecnt, unsigned int readcnt)
+static int buspirate_sendrecv(unsigned char *buf, unsigned int writecnt,
+ unsigned int readcnt)
{
int i, ret = 0;
@@ -90,13 +91,13 @@
const unsigned char *writearr, unsigned char *readarr);
static const struct spi_programmer spi_programmer_buspirate = {
- .type = SPI_CONTROLLER_BUSPIRATE,
- .max_data_read = 12,
- .max_data_write = 12,
- .command = buspirate_spi_send_command,
- .multicommand = default_spi_send_multicommand,
- .read = default_spi_read,
- .write_256 = default_spi_write_256,
+ .type = SPI_CONTROLLER_BUSPIRATE,
+ .max_data_read = 12,
+ .max_data_write = 12,
+ .command = buspirate_spi_send_command,
+ .multicommand = default_spi_send_multicommand,
+ .read = default_spi_read,
+ .write_256 = default_spi_write_256,
};
static const struct buspirate_spispeeds spispeeds[] = {
@@ -108,7 +109,7 @@
{"2.6M", 0x5},
{"4M", 0x6},
{"8M", 0x7},
- {NULL, 0x0}
+ {NULL, 0x0},
};
static int buspirate_spi_shutdown(void *data)
@@ -149,11 +150,9 @@
int buspirate_spi_init(void)
{
unsigned char buf[512];
- int ret = 0;
- int i;
+ int ret = 0, i, spispeed = 0x7;
char *dev = NULL;
char *speed = NULL;
- int spispeed = 0x7;
dev = extract_programmer_param("dev");
if (!dev || !strlen(dev)) {