mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-22 04:44:46 +00:00
misc: i2c_eeprom: remove pagewidth field from i2c_eeprom
This struct member is not used in any effective way. Remove it. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
This commit is contained in:
parent
ba6fb2f6ac
commit
ed6dd4e460
2 changed files with 3 additions and 7 deletions
|
@ -99,13 +99,11 @@ static int i2c_eeprom_std_ofdata_to_platdata(struct udevice *dev)
|
||||||
u32 pagesize;
|
u32 pagesize;
|
||||||
u32 size;
|
u32 size;
|
||||||
|
|
||||||
if (dev_read_u32(dev, "pagesize", &pagesize) == 0) {
|
if (dev_read_u32(dev, "pagesize", &pagesize) == 0)
|
||||||
priv->pagesize = pagesize;
|
priv->pagesize = pagesize;
|
||||||
} else {
|
else
|
||||||
/* 6 bit -> page size of up to 2^63 (should be sufficient) */
|
/* 6 bit -> page size of up to 2^63 (should be sufficient) */
|
||||||
priv->pagewidth = data->pagewidth;
|
priv->pagesize = 1 << data->pagewidth;
|
||||||
priv->pagesize = (1 << priv->pagewidth);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dev_read_u32(dev, "size", &size) == 0)
|
if (dev_read_u32(dev, "size", &size) == 0)
|
||||||
priv->size = size;
|
priv->size = size;
|
||||||
|
|
|
@ -16,8 +16,6 @@ struct i2c_eeprom_ops {
|
||||||
struct i2c_eeprom {
|
struct i2c_eeprom {
|
||||||
/* The EEPROM's page size in byte */
|
/* The EEPROM's page size in byte */
|
||||||
unsigned long pagesize;
|
unsigned long pagesize;
|
||||||
/* The EEPROM's page width in bits (pagesize = 2^pagewidth) */
|
|
||||||
unsigned pagewidth;
|
|
||||||
/* The EEPROM's capacity in bytes */
|
/* The EEPROM's capacity in bytes */
|
||||||
unsigned long size;
|
unsigned long size;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue