diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-04 02:55:18 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-14 02:51:08 +0300 |
commit | caa4daa2ae3dc0a3e516addea5772c9af76abcb0 (patch) | |
tree | 0abbc5b538894532f4db28d56e4645d3be230d27 /lib | |
parent | 41575d8e4c334df148c4cdd7c40cc825dc0fcaa1 (diff) | |
download | u-boot-caa4daa2ae3dc0a3e516addea5772c9af76abcb0.tar.xz |
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 'lib')
-rw-r--r-- | lib/acpi/acpi_device.c | 4 | ||||
-rw-r--r-- | lib/efi_driver/efi_block_device.c | 20 | ||||
-rw-r--r-- | lib/efi_loader/efi_device_path.c | 14 | ||||
-rw-r--r-- | lib/efi_loader/efi_disk.c | 2 | ||||
-rw-r--r-- | lib/smbios.c | 2 |
5 files changed, 21 insertions, 21 deletions
diff --git a/lib/acpi/acpi_device.c b/lib/acpi/acpi_device.c index c3439a5988..52b21cea70 100644 --- a/lib/acpi/acpi_device.c +++ b/lib/acpi/acpi_device.c @@ -602,7 +602,7 @@ static void acpi_device_write_i2c(struct acpi_ctx *ctx, static int acpi_device_set_i2c(const struct udevice *dev, struct acpi_i2c *i2c, const char *scope) { - struct dm_i2c_chip *chip = dev_get_parent_platdata(dev); + struct dm_i2c_chip *chip = dev_get_parent_plat(dev); struct udevice *bus = dev_get_parent(dev); memset(i2c, '\0', sizeof(*i2c)); @@ -727,7 +727,7 @@ static int acpi_device_set_spi(const struct udevice *dev, struct acpi_spi *spi, struct dm_spi_slave_platdata *plat; struct spi_slave *slave = dev_get_parent_priv(dev); - plat = dev_get_parent_platdata(slave->dev); + plat = dev_get_parent_plat(slave->dev); memset(spi, '\0', sizeof(*spi)); spi->device_select = plat->cs; spi->device_select_polarity = SPI_POLARITY_LOW; diff --git a/lib/efi_driver/efi_block_device.c b/lib/efi_driver/efi_block_device.c index fcd6eb8799..830fdabe38 100644 --- a/lib/efi_driver/efi_block_device.c +++ b/lib/efi_driver/efi_block_device.c @@ -59,8 +59,8 @@ struct efi_blk_platdata { static ulong efi_bl_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, void *buffer) { - struct efi_blk_platdata *platdata = dev_get_platdata(dev); - struct efi_block_io *io = platdata->io; + struct efi_blk_platdata *plat = dev_get_platdata(dev); + struct efi_block_io *io = plat->io; efi_status_t ret; EFI_PRINT("%s: read '%s', from block " LBAFU ", " LBAFU " blocks\n", @@ -88,8 +88,8 @@ static ulong efi_bl_read(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, static ulong efi_bl_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, const void *buffer) { - struct efi_blk_platdata *platdata = dev_get_platdata(dev); - struct efi_block_io *io = platdata->io; + struct efi_blk_platdata *plat = dev_get_platdata(dev); + struct efi_block_io *io = plat->io; efi_status_t ret; EFI_PRINT("%s: write '%s', from block " LBAFU ", " LBAFU " blocks\n", @@ -118,7 +118,7 @@ static int efi_bl_bind_partitions(efi_handle_t handle, struct udevice *dev) struct blk_desc *desc; const char *if_typename; - desc = dev_get_uclass_platdata(dev); + desc = dev_get_uclass_plat(dev); if_typename = blk_get_if_type_name(desc->if_type); return efi_disk_create_partitions(handle, desc, if_typename, @@ -140,7 +140,7 @@ static int efi_bl_bind(efi_handle_t handle, void *interface) struct efi_object *obj = efi_search_obj(handle); struct efi_block_io *io = interface; int disks; - struct efi_blk_platdata *platdata; + struct efi_blk_platdata *plat; EFI_PRINT("%s: handle %p, interface %p\n", __func__, handle, io); @@ -169,9 +169,9 @@ static int efi_bl_bind(efi_handle_t handle, void *interface) /* Set the DM_FLAG_NAME_ALLOCED flag to avoid a memory leak */ device_set_name_alloced(bdev); - platdata = dev_get_platdata(bdev); - platdata->handle = handle; - platdata->io = interface; + plat = dev_get_platdata(bdev); + plat->handle = handle; + plat->io = interface; ret = device_probe(bdev); if (ret) @@ -196,7 +196,7 @@ U_BOOT_DRIVER(efi_blk) = { .name = "efi_blk", .id = UCLASS_BLK, .ops = &efi_blk_ops, - .platdata_auto = sizeof(struct efi_blk_platdata), + .plat_auto = sizeof(struct efi_blk_platdata), }; /* EFI driver operators */ diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index 8a5c13c424..78191f672c 100644 --- a/lib/efi_loader/efi_device_path.c +++ b/lib/efi_loader/efi_device_path.c @@ -531,7 +531,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) case UCLASS_ETH: { struct efi_device_path_mac_addr *dp = dp_fill(buf, dev->parent); - struct eth_pdata *pdata = dev->platdata; + struct eth_pdata *pdata = dev->plat; dp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_MSG_MAC_ADDR; @@ -551,7 +551,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) case UCLASS_ROOT: { /* stop traversing parents at this point: */ struct efi_device_path_vendor *dp; - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); dp_fill(buf, dev->parent); dp = buf; @@ -568,7 +568,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) #ifdef CONFIG_VIRTIO_BLK case UCLASS_VIRTIO: { struct efi_device_path_vendor *dp; - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); dp_fill(buf, dev->parent); dp = buf; @@ -586,7 +586,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) case UCLASS_IDE: { struct efi_device_path_atapi *dp = dp_fill(buf, dev->parent); - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); dp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_MSG_ATAPI; @@ -603,7 +603,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) case UCLASS_SCSI: { struct efi_device_path_scsi *dp = dp_fill(buf, dev->parent); - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); dp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_MSG_SCSI; @@ -617,7 +617,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) case UCLASS_MMC: { struct efi_device_path_sd_mmc_path *sddp = dp_fill(buf, dev->parent); - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); sddp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; sddp->dp.sub_type = is_sd(desc) ? @@ -632,7 +632,7 @@ __maybe_unused static void *dp_fill(void *buf, struct udevice *dev) case UCLASS_AHCI: { struct efi_device_path_sata *dp = dp_fill(buf, dev->parent); - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); dp->dp.type = DEVICE_PATH_TYPE_MESSAGING_DEVICE; dp->dp.sub_type = DEVICE_PATH_SUB_TYPE_MSG_SATA; diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c index 496ef29dd8..26b953461b 100644 --- a/lib/efi_loader/efi_disk.c +++ b/lib/efi_loader/efi_disk.c @@ -547,7 +547,7 @@ efi_status_t efi_disk_register(void) for (uclass_first_device_check(UCLASS_BLK, &dev); dev; uclass_next_device_check(&dev)) { - struct blk_desc *desc = dev_get_uclass_platdata(dev); + struct blk_desc *desc = dev_get_uclass_plat(dev); const char *if_typename = blk_get_if_type_name(desc->if_type); /* Add block device for the full device */ diff --git a/lib/smbios.c b/lib/smbios.c index 485a812c77..4bd16556e3 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -229,7 +229,7 @@ static void smbios_write_type4_dm(struct smbios_type4 *t, ofnode node) uclass_find_first_device(UCLASS_CPU, &cpu); if (cpu) { - struct cpu_platdata *plat = dev_get_parent_platdata(cpu); + struct cpu_platdata *plat = dev_get_parent_plat(cpu); if (plat->family) processor_family = plat->family; |