diff options
author | Martin Roth <martin@coreboot.org> | 2019-10-23 21:41:00 -0600 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2019-10-27 21:08:39 +0000 |
commit | 38ddbfb325866716c9c65a460e388f33d1a773dd (patch) | |
tree | ffc7469c60e0a94321cf96de2bd0c4928067849f /src/drivers/i2c/ww_ring | |
parent | e74ca4ffc2008a93e38909a4d583408affbaf28a (diff) |
src/[arch-lib]: change "unsigned" to "unsigned int"
Signed-off-by: Martin Roth <martin@coreboot.org>
Change-Id: Ibb7b48a7a144421aff29acbb7ac30968ae5fe5ab
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36329
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/drivers/i2c/ww_ring')
-rw-r--r-- | src/drivers/i2c/ww_ring/ww_ring.c | 16 | ||||
-rw-r--r-- | src/drivers/i2c/ww_ring/ww_ring.h | 2 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/drivers/i2c/ww_ring/ww_ring.c b/src/drivers/i2c/ww_ring/ww_ring.c index 16f6bd7a77..9957584d28 100644 --- a/src/drivers/i2c/ww_ring/ww_ring.c +++ b/src/drivers/i2c/ww_ring/ww_ring.c @@ -88,12 +88,12 @@ * the program page size. */ typedef struct { - unsigned i2c_bus; + unsigned int i2c_bus; uint8_t dev_addr; uint8_t data_buffer[LP55231_PROG_PAGE_SIZE + 1]; } TiLp55231; -static void ww_ring_init(unsigned i2c_bus); +static void ww_ring_init(unsigned int i2c_bus); /* Controller descriptors. */ static TiLp55231 lp55231s[WW_RING_NUM_LED_CONTROLLERS]; @@ -142,7 +142,7 @@ static int ledc_transfer(TiLp55231 *ledc, struct i2c_msg *segs, * bytes can be transmitted in one write transaction. */ static int ledc_write(TiLp55231 *ledc, uint8_t start_addr, - const uint8_t *data, unsigned count) + const uint8_t *data, unsigned int count) { struct i2c_msg seg; @@ -220,10 +220,10 @@ static int ledc_reset(TiLp55231 *ledc) * into sections fitting into memory pages. */ static void ledc_write_program(TiLp55231 *ledc, uint8_t load_addr, - const uint8_t *program, unsigned count) + const uint8_t *program, unsigned int count) { uint8_t page_num = load_addr / LP55231_PROG_PAGE_SIZE; - unsigned page_offs = load_addr % LP55231_PROG_PAGE_SIZE; + unsigned int page_offs = load_addr % LP55231_PROG_PAGE_SIZE; if ((load_addr + count) > LP55231_MAX_PROG_SIZE) { printk(BIOS_WARNING, @@ -233,7 +233,7 @@ static void ledc_write_program(TiLp55231 *ledc, uint8_t load_addr, } while (count) { - unsigned segment_size = LP55231_PROG_PAGE_SIZE - page_offs; + unsigned int segment_size = LP55231_PROG_PAGE_SIZE - page_offs; if (segment_size > count) segment_size = count; @@ -334,7 +334,7 @@ static int ledc_init_validate(TiLp55231 *ledc) * Find a program matching screen type, and run it on both controllers, if * found. */ -int ww_ring_display_pattern(unsigned i2c_bus, enum display_pattern pattern) +int ww_ring_display_pattern(unsigned int i2c_bus, enum display_pattern pattern) { static int initted; const WwRingStateProg *wwr_prog; @@ -379,7 +379,7 @@ int ww_ring_display_pattern(unsigned i2c_bus, enum display_pattern pattern) #define LP55231_I2C_BASE_ADDR 0x32 -static void ww_ring_init(unsigned i2c_bus) +static void ww_ring_init(unsigned int i2c_bus) { TiLp55231 *ledc; int i, count = 0; diff --git a/src/drivers/i2c/ww_ring/ww_ring.h b/src/drivers/i2c/ww_ring/ww_ring.h index 911a85a1e4..a3c3372c1c 100644 --- a/src/drivers/i2c/ww_ring/ww_ring.h +++ b/src/drivers/i2c/ww_ring/ww_ring.h @@ -30,6 +30,6 @@ enum display_pattern { * * Display pattern on the ring LEDs. */ -int ww_ring_display_pattern(unsigned i2c_bus, enum display_pattern pattern); +int ww_ring_display_pattern(unsigned int i2c_bus, enum display_pattern pattern); #endif |