summaryrefslogtreecommitdiff
path: root/drivers/misc/i2c_eeprom_emul.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-03 16:55:20 -0700
committerSimon Glass <sjg@chromium.org>2020-12-13 16:51:09 -0700
commitc69cda25c9b59e53a6bc8969ada58942549f5b5d (patch)
tree8c84d1773465eb8e06cbbaeb710daa6217f5618d /drivers/misc/i2c_eeprom_emul.c
parent4f50086ad6d69c355a07389fb436c64c92ec614a (diff)
downloadu-boot-c69cda25c9b59e53a6bc8969ada58942549f5b5d.tar.gz
dm: treewide: Rename dev_get_platdata() to dev_get_plat()
Rename this to be consistent with the change from 'platdata'. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/misc/i2c_eeprom_emul.c')
-rw-r--r--drivers/misc/i2c_eeprom_emul.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/misc/i2c_eeprom_emul.c b/drivers/misc/i2c_eeprom_emul.c
index 65db9c808f..92b2f277a5 100644
--- a/drivers/misc/i2c_eeprom_emul.c
+++ b/drivers/misc/i2c_eeprom_emul.c
@@ -36,14 +36,14 @@ struct sandbox_i2c_flash {
void sandbox_i2c_eeprom_set_test_mode(struct udevice *dev,
enum sandbox_i2c_eeprom_test_mode mode)
{
- struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
+ struct sandbox_i2c_flash_plat_data *plat = dev_get_plat(dev);
plat->test_mode = mode;
}
void sandbox_i2c_eeprom_set_offset_len(struct udevice *dev, int offset_len)
{
- struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
+ struct sandbox_i2c_flash_plat_data *plat = dev_get_plat(dev);
plat->offset_len = offset_len;
}
@@ -51,7 +51,7 @@ void sandbox_i2c_eeprom_set_offset_len(struct udevice *dev, int offset_len)
void sandbox_i2c_eeprom_set_chip_addr_offset_mask(struct udevice *dev,
uint mask)
{
- struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
+ struct sandbox_i2c_flash_plat_data *plat = dev_get_plat(dev);
plat->chip_addr_offset_mask = mask;
}
@@ -74,7 +74,7 @@ static int sandbox_i2c_eeprom_xfer(struct udevice *emul, struct i2c_msg *msg,
int nmsgs)
{
struct sandbox_i2c_flash *priv = dev_get_priv(emul);
- struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(emul);
+ struct sandbox_i2c_flash_plat_data *plat = dev_get_plat(emul);
uint offset = msg->addr & plat->chip_addr_offset_mask;
debug("\n%s\n", __func__);
@@ -151,7 +151,7 @@ struct dm_i2c_ops sandbox_i2c_emul_ops = {
static int sandbox_i2c_eeprom_ofdata_to_platdata(struct udevice *dev)
{
- struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
+ struct sandbox_i2c_flash_plat_data *plat = dev_get_plat(dev);
plat->size = dev_read_u32_default(dev, "sandbox,size", 32);
plat->filename = dev_read_string(dev, "sandbox,filename");
@@ -169,7 +169,7 @@ static int sandbox_i2c_eeprom_ofdata_to_platdata(struct udevice *dev)
static int sandbox_i2c_eeprom_probe(struct udevice *dev)
{
- struct sandbox_i2c_flash_plat_data *plat = dev_get_platdata(dev);
+ struct sandbox_i2c_flash_plat_data *plat = dev_get_plat(dev);
struct sandbox_i2c_flash *priv = dev_get_priv(dev);
priv->data = calloc(1, plat->size);