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>
diff --git a/drivers/pci/pci-emul-uclass.c b/drivers/pci/pci-emul-uclass.c
index 3ca9a15..f71ba42 100644
--- a/drivers/pci/pci-emul-uclass.c
+++ b/drivers/pci/pci-emul-uclass.c
@@ -110,9 +110,9 @@
};
/*
- * This uclass is a child of the pci bus. Its platdata is not defined here so
+ * This uclass is a child of the pci bus. Its plat is not defined here so
* is defined by its parent, UCLASS_PCI, which uses struct pci_child_platdata.
- * See per_child_platdata_auto in UCLASS_DRIVER(pci).
+ * See per_child_plat_auto in UCLASS_DRIVER(pci).
*/
UCLASS_DRIVER(pci_emul_parent) = {
.id = UCLASS_PCI_EMUL_PARENT,
diff --git a/drivers/pci/pci-rcar-gen3.c b/drivers/pci/pci-rcar-gen3.c
index f01fcf6..3a0a4b5 100644
--- a/drivers/pci/pci-rcar-gen3.c
+++ b/drivers/pci/pci-rcar-gen3.c
@@ -400,5 +400,5 @@
.ops = &rcar_gen3_pcie_ops,
.probe = rcar_gen3_pcie_probe,
.ofdata_to_platdata = rcar_gen3_pcie_ofdata_to_platdata,
- .platdata_auto = sizeof(struct rcar_gen3_pcie_priv),
+ .plat_auto = sizeof(struct rcar_gen3_pcie_priv),
};
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 6093072..7625d43 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -49,7 +49,7 @@
pci_dev_t dm_pci_get_bdf(const struct udevice *dev)
{
- struct pci_child_platdata *pplat = dev_get_parent_platdata(dev);
+ struct pci_child_platdata *pplat = dev_get_parent_plat(dev);
struct udevice *bus = dev->parent;
/*
@@ -138,7 +138,7 @@
device_find_next_child(&dev)) {
struct pci_child_platdata *pplat;
- pplat = dev_get_parent_platdata(dev);
+ pplat = dev_get_parent_plat(dev);
if (pplat && pplat->devfn == find_devfn) {
*devp = dev;
return 0;
@@ -165,7 +165,7 @@
struct pci_child_platdata *pplat;
int i;
- pplat = dev_get_parent_platdata(dev);
+ pplat = dev_get_parent_plat(dev);
if (!pplat)
return -EINVAL;
for (i = 0; ids[i].vendor != 0; i++) {
@@ -224,7 +224,7 @@
for (device_find_first_child(bus, &dev);
dev;
device_find_next_child(&dev)) {
- pplat = dev_get_parent_platdata(dev);
+ pplat = dev_get_parent_plat(dev);
if (pplat->vendor == vendor && pplat->device == device) {
if (!(*indexp)--) {
*devp = dev;
@@ -261,7 +261,7 @@
for (pci_find_first_device(&dev);
dev;
pci_find_next_device(&dev)) {
- struct pci_child_platdata *pplat = dev_get_parent_platdata(dev);
+ struct pci_child_platdata *pplat = dev_get_parent_plat(dev);
if (pplat->class == find_class && !index--) {
*devp = dev;
@@ -548,7 +548,7 @@
max_bus = ret;
sub_bus = max(sub_bus, max_bus);
- pplat = dev_get_parent_platdata(dev);
+ pplat = dev_get_parent_plat(dev);
if (pplat->class == (PCI_CLASS_DISPLAY_VGA << 8))
set_vga_bridge_bits(dev);
}
@@ -744,7 +744,7 @@
/*
* We could pass the descriptor to the driver as
- * platdata (instead of NULL) and allow its bind()
+ * plat (instead of NULL) and allow its bind()
* method to return -ENOENT if it doesn't support this
* device. That way we could continue the search to
* find another driver. For now this doesn't seem
@@ -868,7 +868,7 @@
return ret;
/* Update the platform data */
- pplat = dev_get_parent_platdata(dev);
+ pplat = dev_get_parent_plat(dev);
pplat->devfn = PCI_MASK_BUS(bdf);
pplat->vendor = vendor;
pplat->device = device;
@@ -1085,7 +1085,7 @@
if (!dev_of_valid(dev))
return 0;
- pplat = dev_get_parent_platdata(dev);
+ pplat = dev_get_parent_plat(dev);
/* Extract vendor id and device id if available */
ofnode_read_pci_vendev(dev_ofnode(dev), &pplat->vendor, &pplat->device);
@@ -1523,7 +1523,7 @@
void *dm_pci_map_bar(struct udevice *dev, int bar, int flags)
{
- struct pci_child_platdata *pdata = dev_get_parent_platdata(dev);
+ struct pci_child_platdata *pdata = dev_get_parent_plat(dev);
struct udevice *udev = dev;
pci_addr_t pci_bus_addr;
u32 bar_response;
@@ -1753,7 +1753,7 @@
}
/* Update the platform data */
- pplat = dev_get_parent_platdata(dev);
+ pplat = dev_get_parent_plat(dev);
pplat->devfn = PCI_MASK_BUS(bdf);
pplat->vendor = vendor;
pplat->device = device;
@@ -1797,7 +1797,7 @@
.post_probe = pci_uclass_post_probe,
.child_post_bind = pci_uclass_child_post_bind,
.per_device_auto = sizeof(struct pci_controller),
- .per_child_platdata_auto =
+ .per_child_plat_auto =
sizeof(struct pci_child_platdata),
};
diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c
index 207ae33..7deb15f 100644
--- a/drivers/pci/pci_mvebu.c
+++ b/drivers/pci/pci_mvebu.c
@@ -471,7 +471,7 @@
.ops = &mvebu_pcie_ops,
.probe = mvebu_pcie_probe,
.ofdata_to_platdata = mvebu_pcie_ofdata_to_platdata,
- .platdata_auto = sizeof(struct mvebu_pcie),
+ .plat_auto = sizeof(struct mvebu_pcie),
};
/*
diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c
index fa29d69..9c98496 100644
--- a/drivers/pci/pci_rom.c
+++ b/drivers/pci/pci_rom.c
@@ -68,7 +68,7 @@
static int pci_rom_probe(struct udevice *dev, struct pci_rom_header **hdrp)
{
- struct pci_child_platdata *pplat = dev_get_parent_platdata(dev);
+ struct pci_child_platdata *pplat = dev_get_parent_plat(dev);
struct pci_rom_header *rom_header;
struct pci_rom_data *rom_data;
u16 rom_vendor, rom_device;
@@ -236,7 +236,7 @@
int dm_pci_run_vga_bios(struct udevice *dev, int (*int15_handler)(void),
int exec_method)
{
- struct pci_child_platdata *pplat = dev_get_parent_platdata(dev);
+ struct pci_child_platdata *pplat = dev_get_parent_plat(dev);
struct pci_rom_header *rom = NULL, *ram = NULL;
int vesa_mode = -1;
bool emulate, alloced;
@@ -363,7 +363,7 @@
int vbe_setup_video(struct udevice *dev, int (*int15_handler)(void))
{
- struct video_uc_platdata *plat = dev_get_uclass_platdata(dev);
+ struct video_uc_platdata *plat = dev_get_uclass_plat(dev);
struct video_priv *uc_priv = dev_get_uclass_priv(dev);
int ret;
diff --git a/drivers/pci/pci_sandbox.c b/drivers/pci/pci_sandbox.c
index d318b33..6de9af9 100644
--- a/drivers/pci/pci_sandbox.c
+++ b/drivers/pci/pci_sandbox.c
@@ -132,6 +132,6 @@
/* Attach an emulator if we can */
.child_post_bind = dm_scan_fdt_dev,
- .per_child_platdata_auto =
+ .per_child_plat_auto =
sizeof(struct pci_child_platdata),
};
diff --git a/drivers/pci/pcie_mediatek.c b/drivers/pci/pcie_mediatek.c
index 2ebe4a4..41c38ed 100644
--- a/drivers/pci/pcie_mediatek.c
+++ b/drivers/pci/pcie_mediatek.c
@@ -264,7 +264,7 @@
while (dev->parent->seq != 0)
dev = dev->parent;
- pplat = dev_get_parent_platdata(dev);
+ pplat = dev_get_parent_plat(dev);
}
list_for_each_entry(port, &pcie->ports, list) {