From b20a55adb790897ec0c1a861448d10c03a8dff8b Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Fri, 19 Aug 2022 03:25:05 +0200 Subject: 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 Change-Id: Id28c2c9043dda7a400b8c4e9ca218cb445e97d24 Reviewed-on: https://review.coreboot.org/c/flashrom/+/66900 Reviewed-by: Anastasia Klimchuk Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- it87spi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'it87spi.c') diff --git a/it87spi.c b/it87spi.c index eb041418a..85da1507b 100644 --- a/it87spi.c +++ b/it87spi.c @@ -20,6 +20,7 @@ */ #include +#include #include #include #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 @@ static int it8716f_spi_chip_read(struct flashctx *flash, uint8_t *buf, 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 @@ static uint16_t it87spi_probe(const struct programmer_cfg *cfg, uint16_t port) } 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"); -- cgit v1.2.3