dm: treewide: Rename ..._platdata variables to just ..._plat

Try to maintain some consistency between these variables by using _plat as
a suffix for them.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2020-12-03 16:55:23 -07:00
parent b012ff1f1b
commit 8a8d24bdf1
358 changed files with 1404 additions and 1411 deletions

View File

@@ -25,12 +25,12 @@
#define BUF_SIZE 4096
/**
* struct testacpi_platdata - Platform data for the test ACPI device
* struct testacpi_plat - Platform data for the test ACPI device
*
* @no_name: true to emit an empty ACPI name from testacpi_get_name()
* @return_error: true to return an error instead of a name
*/
struct testacpi_platdata {
struct testacpi_plat {
bool return_error;
bool no_name;
};
@@ -53,7 +53,7 @@ static int testacpi_write_tables(const struct udevice *dev,
static int testacpi_get_name(const struct udevice *dev, char *out_name)
{
struct testacpi_platdata *plat = dev_get_plat(dev);
struct testacpi_plat *plat = dev_get_plat(dev);
if (plat->return_error)
return -EINVAL;
@@ -110,7 +110,7 @@ U_BOOT_DRIVER(testacpi_drv) = {
.of_match = testacpi_ids,
.id = UCLASS_TEST_ACPI,
.bind = dm_scan_fdt_dev,
.plat_auto = sizeof(struct testacpi_platdata),
.plat_auto = sizeof(struct testacpi_plat),
ACPI_OPS_PTR(&testacpi_ops)
};
@@ -422,7 +422,7 @@ DM_TEST(dm_test_acpi_cmd_dump, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
/* Test acpi_device_path() */
static int dm_test_acpi_device_path(struct unit_test_state *uts)
{
struct testacpi_platdata *plat;
struct testacpi_plat *plat;
char buf[ACPI_PATH_MAX];
struct udevice *dev, *child;

View File

@@ -120,7 +120,7 @@ static int dm_test_autobind(struct unit_test_state *uts)
ut_asserteq(0, list_count_items(&gd->dm_root->child_head));
ut_asserteq(0, dm_testdrv_op_count[DM_TEST_OP_POST_BIND]);
ut_assertok(dm_scan_platdata(false));
ut_assertok(dm_scan_plat(false));
/* We should have our test class now at least, plus more children */
ut_assert(1 < list_count_items(&gd->uclass_root));
@@ -264,7 +264,7 @@ static int dm_test_autoprobe(struct unit_test_state *uts)
DM_TEST(dm_test_autoprobe, UT_TESTF_SCAN_PDATA);
/* Check that we see the correct plat in each device */
static int dm_test_platdata(struct unit_test_state *uts)
static int dm_test_plat(struct unit_test_state *uts)
{
const struct dm_test_pdata *pdata;
struct udevice *dev;
@@ -279,7 +279,7 @@ static int dm_test_platdata(struct unit_test_state *uts)
return 0;
}
DM_TEST(dm_test_platdata, UT_TESTF_SCAN_PDATA);
DM_TEST(dm_test_plat, UT_TESTF_SCAN_PDATA);
/* Test that we can bind, probe, remove, unbind a driver */
static int dm_test_lifecycle(struct unit_test_state *uts)
@@ -485,7 +485,7 @@ static int dm_test_leak(struct unit_test_state *uts)
dm_leak_check_start(uts);
ut_assertok(dm_scan_platdata(false));
ut_assertok(dm_scan_plat(false));
ut_assertok(dm_scan_fdt(false));
/* Scanning the uclass is enough to probe all the devices */

View File

@@ -8,7 +8,7 @@
#include <test/ut.h>
/* Test that we can find a device using of-platdata */
static int dm_test_of_platdata_base(struct unit_test_state *uts)
static int dm_test_of_plat_base(struct unit_test_state *uts)
{
struct udevice *dev;
@@ -17,10 +17,10 @@ static int dm_test_of_platdata_base(struct unit_test_state *uts)
return 0;
}
DM_TEST(dm_test_of_platdata_base, UT_TESTF_SCAN_PDATA);
DM_TEST(dm_test_of_plat_base, UT_TESTF_SCAN_PDATA);
/* Test that we can read properties from a device */
static int dm_test_of_platdata_props(struct unit_test_state *uts)
static int dm_test_of_plat_props(struct unit_test_state *uts)
{
struct dtd_sandbox_spl_test *plat;
struct udevice *dev;
@@ -89,7 +89,7 @@ static int dm_test_of_platdata_props(struct unit_test_state *uts)
return 0;
}
DM_TEST(dm_test_of_platdata_props, UT_TESTF_SCAN_PDATA);
DM_TEST(dm_test_of_plat_props, UT_TESTF_SCAN_PDATA);
/*
* find_driver_info - recursively find the driver_info for a device
@@ -139,7 +139,7 @@ static int find_driver_info(struct unit_test_state *uts, struct udevice *parent,
}
/* Check that every device is recorded in its driver_info struct */
static int dm_test_of_platdata_dev(struct unit_test_state *uts)
static int dm_test_of_plat_dev(struct unit_test_state *uts)
{
const struct driver_info *info =
ll_entry_start(struct driver_info, driver_info);
@@ -171,10 +171,10 @@ static int dm_test_of_platdata_dev(struct unit_test_state *uts)
return 0;
}
DM_TEST(dm_test_of_platdata_dev, UT_TESTF_SCAN_PDATA);
DM_TEST(dm_test_of_plat_dev, UT_TESTF_SCAN_PDATA);
/* Test handling of phandles that point to other devices */
static int dm_test_of_platdata_phandle(struct unit_test_state *uts)
static int dm_test_of_plat_phandle(struct unit_test_state *uts)
{
struct dtd_sandbox_clk_test *plat;
struct udevice *dev, *clk;
@@ -204,11 +204,11 @@ static int dm_test_of_platdata_phandle(struct unit_test_state *uts)
return 0;
}
DM_TEST(dm_test_of_platdata_phandle, UT_TESTF_SCAN_PDATA);
DM_TEST(dm_test_of_plat_phandle, UT_TESTF_SCAN_PDATA);
#if CONFIG_IS_ENABLED(OF_PLATDATA_PARENT)
/* Test that device parents are correctly set up */
static int dm_test_of_platdata_parent(struct unit_test_state *uts)
static int dm_test_of_plat_parent(struct unit_test_state *uts)
{
struct udevice *rtc, *i2c;
@@ -218,5 +218,5 @@ static int dm_test_of_platdata_parent(struct unit_test_state *uts)
return 0;
}
DM_TEST(dm_test_of_platdata_parent, UT_TESTF_SCAN_PDATA);
DM_TEST(dm_test_of_plat_parent, UT_TESTF_SCAN_PDATA);
#endif

View File

@@ -89,7 +89,7 @@ static int dm_do_test(struct unit_test_state *uts, struct unit_test *test,
uts->start = mallinfo();
if (test->flags & UT_TESTF_SCAN_PDATA)
ut_assertok(dm_scan_platdata(false));
ut_assertok(dm_scan_plat(false));
if (test->flags & UT_TESTF_PROBE_TEST)
ut_assertok(do_autoprobe(uts));
if (!CONFIG_IS_ENABLED(OF_PLATDATA) &&
@@ -211,7 +211,7 @@ int dm_test_main(const char *test_name)
gd_set_of_root(uts->of_root);
gd->dm_root = NULL;
ut_assertok(dm_init(CONFIG_IS_ENABLED(OF_LIVE)));
dm_scan_platdata(false);
dm_scan_plat(false);
if (!CONFIG_IS_ENABLED(OF_PLATDATA))
dm_scan_fdt(false);