From a5dc0911293d4bdc7e1a0c5a2e3abd80ee51b857 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 30 Jun 2013 03:47:33 -0700 Subject: i2c: Change the type of the data parameter to uint8_t. Data is intended to be a byte array, so it should be described by a type which has a fixed size equal to an 8 bit byte. Also, the data passed to write shouldn't be modified and can be const. Change-Id: I6466303d962998f6c37c2d4006a39c2d79a235c1 Signed-off-by: Gabe Black Reviewed-on: http://review.coreboot.org/3721 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/include/device/i2c.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/include/device/i2c.h') diff --git a/src/include/device/i2c.h b/src/include/device/i2c.h index d880a7bbae..997d201341 100644 --- a/src/include/device/i2c.h +++ b/src/include/device/i2c.h @@ -20,10 +20,12 @@ #ifndef _DEVICE_I2C_H_ #define _DEVICE_I2C_H_ +#include + /* note: chip is the 7-bit I2C address */ int i2c_read(unsigned bus, unsigned chip, unsigned addr, - unsigned alen, unsigned char *buf, unsigned len); + unsigned alen, uint8_t *buf, unsigned len); int i2c_write(unsigned bus, unsigned chip, unsigned addr, - unsigned alen, unsigned char *buf, unsigned len); + unsigned alen, const uint8_t *buf, unsigned len); #endif /* _DEVICE_I2C_H_ */ -- cgit v1.2.3