diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2020-02-28 22:04:13 +0900 |
---|---|---|
committer | Heiko Schocher <hs@denx.de> | 2020-03-16 08:03:05 +0100 |
commit | ed6dd4e460bd94150dc09fce547a27e2fcca66eb (patch) | |
tree | 86236e76e8a6fb94a1ab555e663eb22bfde30cf0 /drivers/misc | |
parent | ba6fb2f6aca54c6555742d507290cbfaa655e623 (diff) | |
download | u-boot-ed6dd4e460bd94150dc09fce547a27e2fcca66eb.tar.gz |
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>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/i2c_eeprom.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/misc/i2c_eeprom.c b/drivers/misc/i2c_eeprom.c index 6c0459dc55..728e0fd79a 100644 --- a/drivers/misc/i2c_eeprom.c +++ b/drivers/misc/i2c_eeprom.c @@ -99,13 +99,11 @@ static int i2c_eeprom_std_ofdata_to_platdata(struct udevice *dev) u32 pagesize; u32 size; - if (dev_read_u32(dev, "pagesize", &pagesize) == 0) { + if (dev_read_u32(dev, "pagesize", &pagesize) == 0) priv->pagesize = pagesize; - } else { + else /* 6 bit -> page size of up to 2^63 (should be sufficient) */ - priv->pagewidth = data->pagewidth; - priv->pagesize = (1 << priv->pagewidth); - } + priv->pagesize = 1 << data->pagewidth; if (dev_read_u32(dev, "size", &size) == 0) priv->size = size; |