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:
Sean Anderson 2022-05-05 13:11:37 -04:00 committed by Tom Rini
parent 2a5af4049c
commit dda3b38920
2 changed files with 4 additions and 2 deletions

View file

@ -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);
}
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);

View file

@ -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
*/
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