summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-03 16:55:18 -0700
committerSimon Glass <sjg@chromium.org>2020-12-13 16:51:08 -0700
commitcaa4daa2ae3dc0a3e516addea5772c9af76abcb0 (patch)
tree0abbc5b538894532f4db28d56e4645d3be230d27 /cmd
parent41575d8e4c334df148c4cdd7c40cc825dc0fcaa1 (diff)
downloadu-boot-caa4daa2ae3dc0a3e516addea5772c9af76abcb0.tar.gz
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 'cmd')
-rw-r--r--cmd/Kconfig2
-rw-r--r--cmd/button.c2
-rw-r--r--cmd/cpu.c2
-rw-r--r--cmd/demo.c2
-rw-r--r--cmd/i2c.c4
-rw-r--r--cmd/led.c2
-rw-r--r--cmd/lsblk.c2
-rw-r--r--cmd/pci.c2
-rw-r--r--cmd/regulator.c32
-rw-r--r--cmd/remoteproc.c2
10 files changed, 26 insertions, 26 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index c853ce761e..da86a940ce 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1917,7 +1917,7 @@ config CMD_REGULATOR
The '-f' (force) option can be used for set the value which exceeds
the limits, which are found in device-tree and are kept in regulator's
- uclass platdata structure.
+ uclass plat structure.
endmenu
diff --git a/cmd/button.c b/cmd/button.c
index 64c5a8fa04..1b45d0a2a0 100644
--- a/cmd/button.c
+++ b/cmd/button.c
@@ -37,7 +37,7 @@ static int list_buttons(void)
for (uclass_find_first_device(UCLASS_BUTTON, &dev);
dev;
uclass_find_next_device(&dev)) {
- struct button_uc_plat *plat = dev_get_uclass_platdata(dev);
+ struct button_uc_plat *plat = dev_get_uclass_plat(dev);
if (!plat->label)
continue;
diff --git a/cmd/cpu.c b/cmd/cpu.c
index ff553c16c4..d32e2a415d 100644
--- a/cmd/cpu.c
+++ b/cmd/cpu.c
@@ -26,7 +26,7 @@ static int print_cpu_list(bool detail)
for (uclass_first_device(UCLASS_CPU, &dev);
dev;
uclass_next_device(&dev)) {
- struct cpu_platdata *plat = dev_get_parent_platdata(dev);
+ struct cpu_platdata *plat = dev_get_parent_plat(dev);
struct cpu_info info;
bool first = true;
int ret, i;
diff --git a/cmd/demo.c b/cmd/demo.c
index 7310aa2907..90d3cff293 100644
--- a/cmd/demo.c
+++ b/cmd/demo.c
@@ -71,7 +71,7 @@ int do_demo_list(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
for (i = 0, ret = uclass_first_device(UCLASS_DEMO, &dev);
dev;
ret = uclass_next_device(&dev)) {
- printf("entry %d - instance %08x, ops %08x, platdata %08x\n",
+ printf("entry %d - instance %08x, ops %08x, plat %08x\n",
i++, (uint)map_to_sysmem(dev),
(uint)map_to_sysmem(dev->driver->ops),
(uint)map_to_sysmem(dev_get_platdata(dev)));
diff --git a/cmd/i2c.c b/cmd/i2c.c
index cc01119b21..dc4b66da20 100644
--- a/cmd/i2c.c
+++ b/cmd/i2c.c
@@ -390,7 +390,7 @@ static int do_i2c_write(struct cmd_tbl *cmdtp, int flag, int argc,
ret = i2c_set_chip_offset_len(dev, alen);
if (ret)
return i2c_report_err(ret, I2C_ERR_WRITE);
- i2c_chip = dev_get_parent_platdata(dev);
+ i2c_chip = dev_get_parent_plat(dev);
if (!i2c_chip)
return i2c_report_err(ret, I2C_ERR_WRITE);
#endif
@@ -1707,7 +1707,7 @@ static void show_bus(struct udevice *bus)
for (device_find_first_child(bus, &dev);
dev;
device_find_next_child(&dev)) {
- struct dm_i2c_chip *chip = dev_get_parent_platdata(dev);
+ struct dm_i2c_chip *chip = dev_get_parent_plat(dev);
printf(" %02x: %s, offset len %x, flags %x\n",
chip->chip_addr, dev->name, chip->offset_len,
diff --git a/cmd/led.c b/cmd/led.c
index 9433fa886c..aa7751933e 100644
--- a/cmd/led.c
+++ b/cmd/led.c
@@ -54,7 +54,7 @@ static int list_leds(void)
for (uclass_find_first_device(UCLASS_LED, &dev);
dev;
uclass_find_next_device(&dev)) {
- struct led_uc_plat *plat = dev_get_uclass_platdata(dev);
+ struct led_uc_plat *plat = dev_get_uclass_plat(dev);
if (!plat->label)
continue;
diff --git a/cmd/lsblk.c b/cmd/lsblk.c
index 653dffce04..6a1c8f5ef4 100644
--- a/cmd/lsblk.c
+++ b/cmd/lsblk.c
@@ -34,7 +34,7 @@ static int do_lsblk(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv
uclass_foreach_dev(udev, uc) {
if (udev->driver != entry)
continue;
- desc = dev_get_uclass_platdata(udev);
+ desc = dev_get_uclass_plat(udev);
printf("%c %s %u", i ? ',' : ':',
blk_get_if_type_name(desc->if_type),
desc->devnum);
diff --git a/cmd/pci.c b/cmd/pci.c
index f91a4eb8ed..628579a0d7 100644
--- a/cmd/pci.c
+++ b/cmd/pci.c
@@ -341,7 +341,7 @@ static void pciinfo(struct udevice *bus, bool short_listing)
device_find_next_child(&dev)) {
struct pci_child_platdata *pplat;
- pplat = dev_get_parent_platdata(dev);
+ pplat = dev_get_parent_plat(dev);
if (short_listing) {
printf("%02x.%02x.%02x ", bus->seq,
PCI_DEV(pplat->devfn), PCI_FUNC(pplat->devfn));
diff --git a/cmd/regulator.c b/cmd/regulator.c
index aa06c9a9fc..3649719539 100644
--- a/cmd/regulator.c
+++ b/cmd/regulator.c
@@ -25,7 +25,7 @@ static int failure(int ret)
static int do_dev(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
const char *name;
int ret = -ENXIO;
@@ -43,7 +43,7 @@ static int do_dev(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
return CMD_RET_USAGE;
}
- uc_pdata = dev_get_uclass_platdata(currdev);
+ uc_pdata = dev_get_uclass_plat(currdev);
if (!uc_pdata) {
printf("%s: no regulator platform data!\n", currdev->name);
return failure(ret);
@@ -56,7 +56,7 @@ static int do_dev(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
}
static int curr_dev_and_platdata(struct udevice **devp,
- struct dm_regulator_uclass_platdata **uc_pdata,
+ struct dm_regulator_uclass_plat **uc_pdata,
bool allow_type_fixed)
{
*devp = NULL;
@@ -69,7 +69,7 @@ static int curr_dev_and_platdata(struct udevice **devp,
*devp = currdev;
- *uc_pdata = dev_get_uclass_platdata(*devp);
+ *uc_pdata = dev_get_uclass_plat(*devp);
if (!*uc_pdata) {
pr_err("Regulator: %s - missing platform data!\n", currdev->name);
return CMD_RET_FAILURE;
@@ -86,7 +86,7 @@ static int curr_dev_and_platdata(struct udevice **devp,
static int do_list(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
struct udevice *dev;
int ret;
@@ -100,7 +100,7 @@ static int do_list(struct cmd_tbl *cmdtp, int flag, int argc,
if (ret)
continue;
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
printf("| %-*.*s| %-*.*s| %s\n",
LIMIT_DEVNAME, LIMIT_DEVNAME, dev->name,
LIMIT_OFNAME, LIMIT_OFNAME, uc_pdata->name,
@@ -143,7 +143,7 @@ static int do_info(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
struct udevice *dev;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
struct dm_regulator_mode *modes;
const char *parent_uc;
int mode_count;
@@ -183,7 +183,7 @@ static int do_info(struct cmd_tbl *cmdtp, int flag, int argc,
}
static void do_status_detail(struct udevice *dev,
- struct dm_regulator_uclass_platdata *uc_pdata)
+ struct dm_regulator_uclass_plat *uc_pdata)
{
int current, value, mode;
const char *mode_name;
@@ -207,12 +207,12 @@ static void do_status_detail(struct udevice *dev,
static void do_status_line(struct udevice *dev)
{
- struct dm_regulator_uclass_platdata *pdata;
+ struct dm_regulator_uclass_plat *pdata;
int current, value, mode;
const char *mode_name;
bool enabled;
- pdata = dev_get_uclass_platdata(dev);
+ pdata = dev_get_uclass_plat(dev);
enabled = regulator_get_enable(dev);
value = regulator_get_value(dev);
current = regulator_get_current(dev);
@@ -237,7 +237,7 @@ static void do_status_line(struct udevice *dev)
static int do_status(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
struct udevice *dev;
int ret;
@@ -263,7 +263,7 @@ static int do_value(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
struct udevice *dev;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
int value;
int force;
int ret;
@@ -313,7 +313,7 @@ static int do_current(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
struct udevice *dev;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
int current;
int ret;
@@ -353,7 +353,7 @@ static int do_mode(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
struct udevice *dev;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
int mode;
int ret;
@@ -389,7 +389,7 @@ static int do_enable(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
struct udevice *dev;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
int ret;
ret = curr_dev_and_platdata(&dev, &uc_pdata, true);
@@ -409,7 +409,7 @@ static int do_disable(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
struct udevice *dev;
- struct dm_regulator_uclass_platdata *uc_pdata;
+ struct dm_regulator_uclass_plat *uc_pdata;
int ret;
ret = curr_dev_and_platdata(&dev, &uc_pdata, true);
diff --git a/cmd/remoteproc.c b/cmd/remoteproc.c
index e8b9178e74..02d44d4f0a 100644
--- a/cmd/remoteproc.c
+++ b/cmd/remoteproc.c
@@ -32,7 +32,7 @@ static int print_remoteproc_list(void)
struct dm_rproc_uclass_pdata *uc_pdata;
const struct dm_rproc_ops *ops = rproc_get_ops(dev);
- uc_pdata = dev_get_uclass_platdata(dev);
+ uc_pdata = dev_get_uclass_plat(dev);
/* Do not print if rproc is not probed */
if (!(dev->flags & DM_FLAG_ACTIVATED))