dm: Use access methods for dev/uclass private data
Most drivers use these access methods but a few do not. Update them.
In some cases the access is not permitted, so mark those with a FIXME tag
for the maintainer to check.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Pratyush Yadav <p.yadav@ti.com>
diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c
index eb3c2cf..9e8c290 100644
--- a/test/dm/test-fdt.c
+++ b/test/dm/test-fdt.c
@@ -25,7 +25,7 @@
static int testfdt_drv_ping(struct udevice *dev, int pingval, int *pingret)
{
- const struct dm_test_pdata *pdata = dev->plat;
+ const struct dm_test_pdata *pdata = dev_get_plat(dev);
struct dm_test_priv *priv = dev_get_priv(dev);
*pingret = pingval + pdata->ping_add;
@@ -288,7 +288,7 @@
ret = uclass_find_device(UCLASS_TEST_FDT, i, &dev);
ut_assert(!ret);
ut_assert(!dev_get_priv(dev));
- ut_assert(dev->plat);
+ ut_assert(dev_get_plat(dev));
}
ut_assertok(dm_check_devices(uts, num_devices));