Anastasia Klimchuk submitted this change.
it87spi.c: Retype attribute `fast_spi` with bool
Use the bool type instead of an integer for the attribute `fast_spi`,
since this represents its purpose much better.
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Change-Id: Id28c2c9043dda7a400b8c4e9ca218cb445e97d24
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66900
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
---
M it87spi.c
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/it87spi.c b/it87spi.c
index eb04141..85da150 100644
--- a/it87spi.c
+++ b/it87spi.c
@@ -20,6 +20,7 @@
*/
#include <string.h>
+#include <stdbool.h>
#include <stdlib.h>
#include <errno.h>
#include "flash.h"
@@ -39,7 +40,7 @@
struct it8716f_spi_data {
uint16_t flashport;
/* use fast 33MHz SPI (<>0) or slow 16MHz (0) */
- int fast_spi;
+ bool fast_spi;
};
static int get_data_from_context(const struct flashctx *flash, struct it8716f_spi_data **data)
@@ -242,7 +243,7 @@
if (get_data_from_context(flash, &data) < 0)
return SPI_GENERIC_ERROR;
- data->fast_spi = 0;
+ data->fast_spi = false;
/* FIXME: Check if someone explicitly requested to use IT87 SPI although
* the mainboard does not use IT87 SPI translation. This should be done
@@ -432,7 +433,7 @@
}
data->flashport = flashport;
- data->fast_spi = 1;
+ data->fast_spi = true;
if (internal_buses_supported & BUS_SPI)
msg_pdbg("Overriding chipset SPI with IT87 SPI.\n");
To view, visit change 66900. To unsubscribe, or for help writing mail filters, visit settings.