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/block/blk-uclass.c b/drivers/block/blk-uclass.c
index 714e5d7..d0d91db 100644
--- a/drivers/block/blk-uclass.c
+++ b/drivers/block/blk-uclass.c
@@ -79,7 +79,7 @@
ret = blk_get_device(if_type, devnum, &dev);
if (ret)
return NULL;
- desc = dev_get_uclass_platdata(dev);
+ desc = dev_get_uclass_plat(dev);
return desc;
}
@@ -114,7 +114,7 @@
if (ret)
return NULL;
uclass_foreach_dev(dev, uc) {
- struct blk_desc *desc = dev_get_uclass_platdata(dev);
+ struct blk_desc *desc = dev_get_uclass_plat(dev);
debug("%s: if_type=%d, devnum=%d: %s, %d, %d\n", __func__,
if_type, devnum, dev->name, desc->if_type, desc->devnum);
@@ -154,7 +154,7 @@
if (device_get_uclass_id(child_dev) != UCLASS_BLK)
continue;
- return dev_get_uclass_platdata(child_dev);
+ return dev_get_uclass_plat(child_dev);
}
debug("%s: No block device found\n", __func__);
@@ -184,7 +184,7 @@
if (ret)
return ret;
uclass_foreach_dev(dev, uc) {
- struct blk_desc *desc = dev_get_uclass_platdata(dev);
+ struct blk_desc *desc = dev_get_uclass_plat(dev);
debug("%s: if_type=%d, devnum=%d: %s, %d, %d\n", __func__,
if_type, devnum, dev->name, desc->if_type, desc->devnum);
@@ -368,7 +368,7 @@
if (!*devp)
return -ENODEV;
do {
- desc = dev_get_uclass_platdata(*devp);
+ desc = dev_get_uclass_plat(*devp);
if (desc->if_type == if_type)
return 0;
ret = uclass_find_next_device(devp);
@@ -384,7 +384,7 @@
struct blk_desc *desc;
int ret, if_type;
- desc = dev_get_uclass_platdata(*devp);
+ desc = dev_get_uclass_plat(*devp);
if_type = desc->if_type;
do {
ret = uclass_find_next_device(devp);
@@ -392,7 +392,7 @@
return ret;
if (!*devp)
return -ENODEV;
- desc = dev_get_uclass_platdata(*devp);
+ desc = dev_get_uclass_plat(*devp);
if (desc->if_type == if_type)
return 0;
} while (1);
@@ -408,7 +408,7 @@
if (ret)
return ret;
uclass_foreach_dev(dev, uc) {
- struct blk_desc *desc = dev_get_uclass_platdata(dev);
+ struct blk_desc *desc = dev_get_uclass_plat(dev);
debug("%s: if_type=%d, devnum=%d: %s, %d, %d\n", __func__,
if_type, devnum, dev->name, desc->if_type, desc->devnum);
@@ -516,7 +516,7 @@
if (ret)
return ret;
uclass_foreach_dev(dev, uc) {
- struct blk_desc *desc = dev_get_uclass_platdata(dev);
+ struct blk_desc *desc = dev_get_uclass_plat(dev);
if (desc->if_type == if_type && desc->devnum > max_devnum)
max_devnum = desc->devnum;
@@ -548,7 +548,7 @@
if (ret)
return ret;
uclass_foreach_dev(dev, uc) {
- struct blk_desc *desc = dev_get_uclass_platdata(dev);
+ struct blk_desc *desc = dev_get_uclass_plat(dev);
if (desc->if_type == if_type && desc->devnum == devnum) {
int next = blk_next_free_devnum(if_type);
@@ -583,7 +583,7 @@
ret = device_bind_driver(parent, drv_name, name, &dev);
if (ret)
return ret;
- desc = dev_get_uclass_platdata(dev);
+ desc = dev_get_uclass_plat(dev);
desc->if_type = if_type;
desc->blksz = blksz;
desc->log2blksz = LOG2(desc->blksz);
@@ -629,7 +629,7 @@
if (ret)
return ret;
uclass_foreach_dev_safe(dev, next, uc) {
- struct blk_desc *desc = dev_get_uclass_platdata(dev);
+ struct blk_desc *desc = dev_get_uclass_plat(dev);
if (desc->if_type == if_type) {
ret = device_remove(dev, DM_REMOVE_NORMAL);
@@ -648,7 +648,7 @@
{
if (IS_ENABLED(CONFIG_PARTITIONS) &&
IS_ENABLED(CONFIG_HAVE_BLOCK_DEVICE)) {
- struct blk_desc *desc = dev_get_uclass_platdata(dev);
+ struct blk_desc *desc = dev_get_uclass_plat(dev);
part_init(desc);
}
@@ -660,5 +660,5 @@
.id = UCLASS_BLK,
.name = "blk",
.post_probe = blk_post_probe,
- .per_device_platdata_auto = sizeof(struct blk_desc),
+ .per_device_plat_auto = sizeof(struct blk_desc),
};
diff --git a/drivers/block/ide.c b/drivers/block/ide.c
index a766b5c..43a0776 100644
--- a/drivers/block/ide.c
+++ b/drivers/block/ide.c
@@ -940,7 +940,7 @@
#endif
{
#ifdef CONFIG_BLK
- struct blk_desc *block_dev = dev_get_uclass_platdata(dev);
+ struct blk_desc *block_dev = dev_get_uclass_plat(dev);
#endif
int device = block_dev->devnum;
ulong n = 0;
@@ -1067,7 +1067,7 @@
#endif
{
#ifdef CONFIG_BLK
- struct blk_desc *block_dev = dev_get_uclass_platdata(dev);
+ struct blk_desc *block_dev = dev_get_uclass_plat(dev);
#endif
int device = block_dev->devnum;
ulong n = 0;
@@ -1160,7 +1160,7 @@
#ifdef CONFIG_BLK
static int ide_blk_probe(struct udevice *udev)
{
- struct blk_desc *desc = dev_get_uclass_platdata(udev);
+ struct blk_desc *desc = dev_get_uclass_plat(udev);
/* fill in device vendor/product/rev strings */
strncpy(desc->vendor, ide_dev_desc[desc->devnum].vendor,
diff --git a/drivers/block/sandbox.c b/drivers/block/sandbox.c
index e5ef260..12d3200 100644
--- a/drivers/block/sandbox.c
+++ b/drivers/block/sandbox.c
@@ -35,7 +35,7 @@
void *buffer)
{
struct host_block_dev *host_dev = dev_get_platdata(dev);
- struct blk_desc *block_dev = dev_get_uclass_platdata(dev);
+ struct blk_desc *block_dev = dev_get_uclass_plat(dev);
#else
static unsigned long host_block_read(struct blk_desc *block_dev,
@@ -66,7 +66,7 @@
const void *buffer)
{
struct host_block_dev *host_dev = dev_get_platdata(dev);
- struct blk_desc *block_dev = dev_get_uclass_platdata(dev);
+ struct blk_desc *block_dev = dev_get_uclass_plat(dev);
#else
static unsigned long host_block_write(struct blk_desc *block_dev,
unsigned long start, lbaint_t blkcnt,
@@ -202,7 +202,7 @@
ret = blk_get_device(IF_TYPE_HOST, devnum, &dev);
if (ret)
return ret;
- *blk_devp = dev_get_uclass_platdata(dev);
+ *blk_devp = dev_get_uclass_plat(dev);
#else
struct host_block_dev *host_dev = find_host_device(devnum);
@@ -228,7 +228,7 @@
.name = "sandbox_host_blk",
.id = UCLASS_BLK,
.ops = &sandbox_host_blk_ops,
- .platdata_auto = sizeof(struct host_block_dev),
+ .plat_auto = sizeof(struct host_block_dev),
};
#else
U_BOOT_LEGACY_BLK(sandbox_host) = {