Commit 5396efb9 authored by Peter Jansweijer's avatar Peter Jansweijer

dev/storage: fix incorrect pointer passed to i2c_eeprom_[read|write|erase]

parent 17b5e854
Pipeline #305 failed with stages
in 8 seconds
...@@ -168,19 +168,19 @@ const struct storage_rwops spi_w1_rwops = { ...@@ -168,19 +168,19 @@ const struct storage_rwops spi_w1_rwops = {
static int sdb_i2c_eeprom_read(struct storage_device *dev, int offset, void *buf, int count) static int sdb_i2c_eeprom_read(struct storage_device *dev, int offset, void *buf, int count)
{ {
struct storage_i2c_eeprom_priv *priv = (struct storage_i2c_eeprom_priv* ) dev->priv; struct storage_i2c_eeprom_priv *priv = (struct storage_i2c_eeprom_priv* ) dev->priv;
return i2c_eeprom_read(priv->dev, offset, buf, count); return i2c_eeprom_read(priv, offset, buf, count);
} }
static int sdb_i2c_eeprom_write(struct storage_device *dev, int offset, void *buf, int count) static int sdb_i2c_eeprom_write(struct storage_device *dev, int offset, void *buf, int count)
{ {
struct storage_i2c_eeprom_priv *priv = (struct storage_i2c_eeprom_priv* ) dev->priv; struct storage_i2c_eeprom_priv *priv = (struct storage_i2c_eeprom_priv* ) dev->priv;
return i2c_eeprom_read(priv->dev, offset, buf, count); return i2c_eeprom_read(priv, offset, buf, count);
} }
static int sdb_i2c_eeprom_erase(struct storage_device *dev, int offset, int count) static int sdb_i2c_eeprom_erase(struct storage_device *dev, int offset, int count)
{ {
struct storage_i2c_eeprom_priv *priv = (struct storage_i2c_eeprom_priv* ) dev->priv; struct storage_i2c_eeprom_priv *priv = (struct storage_i2c_eeprom_priv* ) dev->priv;
return i2c_eeprom_erase(priv->dev, offset, count); return i2c_eeprom_erase(priv, offset, count);
} }
/* Functions for I2C EEPROM access */ /* Functions for I2C EEPROM access */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment