summaryrefslogtreecommitdiff
path: root/src/cpu/samsung/exynos5250
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2013-06-30 03:47:33 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2013-07-10 23:19:49 +0200
commita5dc0911293d4bdc7e1a0c5a2e3abd80ee51b857 (patch)
tree48f15adfd82d284c2ca7c7939b28ae319b419f26 /src/cpu/samsung/exynos5250
parent3858b3f698d75e05206a8ef8578796f8456e5450 (diff)
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 <gabeblack@chromium.org> Reviewed-on: http://review.coreboot.org/3721 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/cpu/samsung/exynos5250')
-rw-r--r--src/cpu/samsung/exynos5250/i2c.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cpu/samsung/exynos5250/i2c.c b/src/cpu/samsung/exynos5250/i2c.c
index 723cee6ce1..e83ab57014 100644
--- a/src/cpu/samsung/exynos5250/i2c.c
+++ b/src/cpu/samsung/exynos5250/i2c.c
@@ -347,7 +347,7 @@ static int i2c_transfer(struct s3c24x0_i2c *i2c,
}
int i2c_read(unsigned bus, unsigned chip, unsigned addr,
- unsigned alen, unsigned char *buf, unsigned len)
+ unsigned alen, uint8_t *buf, unsigned len)
{
struct s3c24x0_i2c_bus *i2c;
unsigned char xaddr[4];
@@ -376,7 +376,7 @@ int i2c_read(unsigned bus, unsigned chip, unsigned addr,
}
int i2c_write(unsigned bus, unsigned chip, unsigned addr,
- unsigned alen, unsigned char *buf, unsigned len)
+ unsigned alen, const uint8_t *buf, unsigned len)
{
struct s3c24x0_i2c_bus *i2c;
unsigned char xaddr[4];
@@ -397,7 +397,7 @@ int i2c_write(unsigned bus, unsigned chip, unsigned addr,
i2c = &i2c_buses[bus];
ret = i2c_transfer(i2c->regs, I2C_WRITE, chip << 1, &xaddr[4 - alen],
- alen, buf, len);
+ alen, (void *)buf, len);
return ret != 0;
}