dm: treewide: Rename dev_get_platdata() to dev_get_plat()
Rename this to be consistent with the change from 'platdata'.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/test/dm/acpi.c b/test/dm/acpi.c
index d0c49c7..1c7c6ca 100644
--- a/test/dm/acpi.c
+++ b/test/dm/acpi.c
@@ -53,7 +53,7 @@
static int testacpi_get_name(const struct udevice *dev, char *out_name)
{
- struct testacpi_platdata *plat = dev_get_platdata(dev);
+ struct testacpi_platdata *plat = dev_get_plat(dev);
if (plat->return_error)
return -EINVAL;
@@ -442,13 +442,13 @@
buf);
/* Test handling of a device which doesn't produce a name */
- plat = dev_get_platdata(dev);
+ plat = dev_get_plat(dev);
plat->no_name = true;
ut_assertok(acpi_device_path(child, buf, sizeof(buf)));
ut_asserteq_str("\\_SB." ACPI_TEST_CHILD_NAME, buf);
/* Test handling of a device which returns an error */
- plat = dev_get_platdata(dev);
+ plat = dev_get_plat(dev);
plat->return_error = true;
ut_asserteq(-EINVAL, acpi_device_path(child, buf, sizeof(buf)));
diff --git a/test/dm/of_platdata.c b/test/dm/of_platdata.c
index 4f3cc15..afa7c2c 100644
--- a/test/dm/of_platdata.c
+++ b/test/dm/of_platdata.c
@@ -31,7 +31,7 @@
ut_asserteq_str("sandbox_clk_test", dev->name);
ut_assertok(uclass_next_device_err(&dev));
- plat = dev_get_platdata(dev);
+ plat = dev_get_plat(dev);
ut_assert(plat->boolval);
ut_asserteq(1, plat->intval);
ut_asserteq(4, ARRAY_SIZE(plat->intarray));
@@ -54,7 +54,7 @@
ut_asserteq_str("", plat->stringarray[2]);
ut_assertok(uclass_next_device_err(&dev));
- plat = dev_get_platdata(dev);
+ plat = dev_get_plat(dev);
ut_assert(!plat->boolval);
ut_asserteq(3, plat->intval);
ut_asserteq(5, plat->intarray[0]);
@@ -74,14 +74,14 @@
ut_asserteq_str("message", plat->stringarray[2]);
ut_assertok(uclass_next_device_err(&dev));
- plat = dev_get_platdata(dev);
+ plat = dev_get_plat(dev);
ut_assert(!plat->boolval);
ut_asserteq_str("one", plat->stringarray[0]);
ut_asserteq_str("", plat->stringarray[1]);
ut_asserteq_str("", plat->stringarray[2]);
ut_assertok(uclass_next_device_err(&dev));
- plat = dev_get_platdata(dev);
+ plat = dev_get_plat(dev);
ut_assert(!plat->boolval);
ut_asserteq_str("spl", plat->stringarray[0]);
@@ -181,7 +181,7 @@
ut_assertok(uclass_first_device_err(UCLASS_MISC, &dev));
ut_asserteq_str("sandbox_clk_test", dev->name);
- plat = dev_get_platdata(dev);
+ plat = dev_get_plat(dev);
ut_assertok(device_get_by_driver_info_idx(plat->clocks[0].idx, &clk));
ut_asserteq_str("fixed_clock", clk->name);
diff --git a/test/dm/test-driver.c b/test/dm/test-driver.c
index 5c074cd..b9f49de 100644
--- a/test/dm/test-driver.c
+++ b/test/dm/test-driver.c
@@ -21,7 +21,7 @@
static int testdrv_ping(struct udevice *dev, int pingval, int *pingret)
{
- const struct dm_test_pdata *pdata = dev_get_platdata(dev);
+ const struct dm_test_pdata *pdata = dev_get_plat(dev);
struct dm_test_priv *priv = dev_get_priv(dev);
*pingret = pingval + pdata->ping_add;
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index 4fb8ea4..2d66d044 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -40,7 +40,7 @@
static int testfdt_ofdata_to_platdata(struct udevice *dev)
{
- struct dm_test_pdata *pdata = dev_get_platdata(dev);
+ struct dm_test_pdata *pdata = dev_get_plat(dev);
pdata->ping_add = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
"ping-add", -1);
@@ -132,7 +132,7 @@
static int testprobe_drv_probe(struct udevice *dev)
{
- struct dm_testprobe_pdata *pdata = dev_get_platdata(dev);
+ struct dm_testprobe_pdata *pdata = dev_get_plat(dev);
return pdata->probe_err;
}
@@ -167,7 +167,7 @@
static int testdevres_drv_bind(struct udevice *dev)
{
- struct dm_testdevres_pdata *pdata = dev_get_platdata(dev);
+ struct dm_testdevres_pdata *pdata = dev_get_plat(dev);
pdata->ptr = devm_kmalloc(dev, TEST_DEVRES_SIZE, 0);
@@ -445,7 +445,7 @@
/* Remove them and try again, with an error on the second one */
ut_assertok(uclass_get_device(UCLASS_TEST_PROBE, 1, &dev));
- pdata = dev_get_platdata(dev);
+ pdata = dev_get_plat(dev);
pdata->probe_err = -ENOMEM;
device_remove(parent, DM_REMOVE_NORMAL);
ut_assertok(uclass_first_device(UCLASS_TEST_PROBE, &dev));
@@ -454,7 +454,7 @@
/* Now an error on the first one */
ut_assertok(uclass_get_device(UCLASS_TEST_PROBE, 0, &dev));
- pdata = dev_get_platdata(dev);
+ pdata = dev_get_plat(dev);
pdata->probe_err = -ENOENT;
device_remove(parent, DM_REMOVE_NORMAL);
ut_asserteq(-ENOENT, uclass_first_device(UCLASS_TEST_PROBE, &dev));
@@ -541,21 +541,21 @@
ut_assertok(check_devices(uts, devlist, 0));
/* Remove them and try again, with an error on the second one */
- pdata = dev_get_platdata(devlist[1]);
+ pdata = dev_get_plat(devlist[1]);
pdata->probe_err = -ENOENT - 1;
device_remove(parent, DM_REMOVE_NORMAL);
ut_assertok(check_devices(uts, devlist, 1 << 1));
/* Now an error on the first one */
- pdata = dev_get_platdata(devlist[0]);
+ pdata = dev_get_plat(devlist[0]);
pdata->probe_err = -ENOENT - 0;
device_remove(parent, DM_REMOVE_NORMAL);
ut_assertok(check_devices(uts, devlist, 3 << 0));
/* Now errors on all */
- pdata = dev_get_platdata(devlist[2]);
+ pdata = dev_get_plat(devlist[2]);
pdata->probe_err = -ENOENT - 2;
- pdata = dev_get_platdata(devlist[3]);
+ pdata = dev_get_plat(devlist[3]);
pdata->probe_err = -ENOENT - 3;
device_remove(parent, DM_REMOVE_NORMAL);
ut_assertok(check_devices(uts, devlist, 0xf << 0));
diff --git a/test/dm/video.c b/test/dm/video.c
index 1af948d..da0ae36 100644
--- a/test/dm/video.c
+++ b/test/dm/video.c
@@ -107,7 +107,7 @@
ut_assertok(uclass_find_device(UCLASS_VIDEO, 0, &dev));
ut_assert(!device_active(dev));
- plat = dev_get_platdata(dev);
+ plat = dev_get_plat(dev);
plat->vidconsole_drv_name = "vidconsole0";
return 0;
@@ -217,7 +217,7 @@
ut_assertok(uclass_find_device(UCLASS_VIDEO, 0, &dev));
ut_assert(!device_active(dev));
- plat = dev_get_platdata(dev);
+ plat = dev_get_plat(dev);
plat->rot = rot;
ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
@@ -359,7 +359,7 @@
ut_assertok(uclass_find_device(UCLASS_VIDEO, 0, &dev));
ut_assert(!device_active(dev));
- plat = dev_get_platdata(dev);
+ plat = dev_get_plat(dev);
plat->font_size = 100;
ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));
@@ -380,7 +380,7 @@
ut_assertok(uclass_find_device(UCLASS_VIDEO, 0, &dev));
ut_assert(!device_active(dev));
- plat = dev_get_platdata(dev);
+ plat = dev_get_plat(dev);
plat->font_size = 100;
ut_assertok(uclass_get_device(UCLASS_VIDEO, 0, &dev));