diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-03 16:55:18 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-13 16:51:08 -0700 |
commit | caa4daa2ae3dc0a3e516addea5772c9af76abcb0 (patch) | |
tree | 0abbc5b538894532f4db28d56e4645d3be230d27 /drivers/misc/p2sb-uclass.c | |
parent | 41575d8e4c334df148c4cdd7c40cc825dc0fcaa1 (diff) | |
download | u-boot-caa4daa2ae3dc0a3e516addea5772c9af76abcb0.zip u-boot-caa4daa2ae3dc0a3e516addea5772c9af76abcb0.tar.gz u-boot-caa4daa2ae3dc0a3e516addea5772c9af76abcb0.tar.bz2 |
dm: treewide: Rename 'platdata' variables to just 'plat'
We use 'priv' for private data but often use 'platdata' for platform data.
We can't really use 'pdata' since that is ambiguous (it could mean private
or platform data).
Rename some of the latter variables to end with 'plat' for consistency.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/misc/p2sb-uclass.c')
-rw-r--r-- | drivers/misc/p2sb-uclass.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/misc/p2sb-uclass.c b/drivers/misc/p2sb-uclass.c index e41c2cd..ce5630f 100644 --- a/drivers/misc/p2sb-uclass.c +++ b/drivers/misc/p2sb-uclass.c @@ -30,7 +30,7 @@ int p2sb_set_hide(struct udevice *dev, bool hide) void *pcr_reg_address(struct udevice *dev, uint offset) { - struct p2sb_child_platdata *pplat = dev_get_parent_platdata(dev); + struct p2sb_child_platdata *pplat = dev_get_parent_plat(dev); struct udevice *p2sb = dev_get_parent(dev); struct p2sb_uc_priv *upriv = dev_get_uclass_priv(p2sb); uintptr_t reg_addr; @@ -161,7 +161,7 @@ void pcr_clrsetbits8(struct udevice *dev, uint offset, uint clr, uint set) int p2sb_get_port_id(struct udevice *dev) { - struct p2sb_child_platdata *pplat = dev_get_parent_platdata(dev); + struct p2sb_child_platdata *pplat = dev_get_parent_plat(dev); return pplat->pid; } @@ -184,11 +184,11 @@ int p2sb_set_port_id(struct udevice *dev, int portid) * We must allocate this, since when the device was bound it did * not have a parent. */ - dev->parent_platdata = malloc(sizeof(*pplat)); - if (!dev->parent_platdata) + dev->parent_plat = malloc(sizeof(*pplat)); + if (!dev->parent_plat) return -ENOMEM; } - pplat = dev_get_parent_platdata(dev); + pplat = dev_get_parent_plat(dev); pplat->pid = portid; return 0; @@ -197,7 +197,7 @@ int p2sb_set_port_id(struct udevice *dev, int portid) static int p2sb_child_post_bind(struct udevice *dev) { #if !CONFIG_IS_ENABLED(OF_PLATDATA) - struct p2sb_child_platdata *pplat = dev_get_parent_platdata(dev); + struct p2sb_child_platdata *pplat = dev_get_parent_plat(dev); int ret; u32 pid; @@ -224,6 +224,6 @@ UCLASS_DRIVER(p2sb) = { .per_device_auto = sizeof(struct p2sb_uc_priv), .post_bind = p2sb_post_bind, .child_post_bind = p2sb_child_post_bind, - .per_child_platdata_auto = + .per_child_plat_auto = sizeof(struct p2sb_child_platdata), }; |