mirror of
https://review.coreboot.org/flashrom.git
synced 2025-06-30 21:52:36 +02:00
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>
This commit is contained in:
@ -50,7 +50,8 @@ static int buspirate_serialport_setup(char *dev)
|
||||
#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 @@ static int buspirate_spi_send_command(unsigned int writecnt, unsigned int readcn
|
||||
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 @@ static const struct buspirate_spispeeds spispeeds[] = {
|
||||
{"2.6M", 0x5},
|
||||
{"4M", 0x6},
|
||||
{"8M", 0x7},
|
||||
{NULL, 0x0}
|
||||
{NULL, 0x0},
|
||||
};
|
||||
|
||||
static int buspirate_spi_shutdown(void *data)
|
||||
@ -149,11 +150,9 @@ static int buspirate_spi_shutdown(void *data)
|
||||
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)) {
|
||||
|
Reference in New Issue
Block a user