mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-03 10:17:21 +00:00
misc: i2c_eeprom: Make i2c_eeprom_write use a const buf
i2c_eeprom_ops->write uses a const buf, so use one for the wrapper function as well. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
2a5af4049c
commit
dda3b38920
2 changed files with 4 additions and 2 deletions
|
@ -33,7 +33,8 @@ int i2c_eeprom_read(struct udevice *dev, int offset, uint8_t *buf, int size)
|
||||||
return ops->read(dev, offset, buf, size);
|
return ops->read(dev, offset, buf, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
int i2c_eeprom_write(struct udevice *dev, int offset, uint8_t *buf, int size)
|
int i2c_eeprom_write(struct udevice *dev, int offset, const uint8_t *buf,
|
||||||
|
int size)
|
||||||
{
|
{
|
||||||
const struct i2c_eeprom_ops *ops = device_get_ops(dev);
|
const struct i2c_eeprom_ops *ops = device_get_ops(dev);
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,8 @@ int i2c_eeprom_read(struct udevice *dev, int offset, uint8_t *buf, int size);
|
||||||
*
|
*
|
||||||
* Return: 0 on success, -ve on failure
|
* Return: 0 on success, -ve on failure
|
||||||
*/
|
*/
|
||||||
int i2c_eeprom_write(struct udevice *dev, int offset, uint8_t *buf, int size);
|
int i2c_eeprom_write(struct udevice *dev, int offset, const uint8_t *buf,
|
||||||
|
int size);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* i2c_eeprom_size() - get size of I2C EEPROM chip
|
* i2c_eeprom_size() - get size of I2C EEPROM chip
|
||||||
|
|
Loading…
Add table
Reference in a new issue