summaryrefslogtreecommitdiffstats
path: root/test/dm/test-driver.c
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2014-05-22 12:43:05 +0200
committerTom Rini <trini@ti.com>2014-05-27 10:21:32 -0400
commit54c5d08a09e631f88738db54c75395c6457c2157 (patch)
tree989241d18408f19062618bc380ef5948154f2334 /test/dm/test-driver.c
parent9665fa8f9e1488209d5e01d0792c243e0a220c5a (diff)
downloadtalos-obmc-uboot-54c5d08a09e631f88738db54c75395c6457c2157.tar.gz
talos-obmc-uboot-54c5d08a09e631f88738db54c75395c6457c2157.zip
dm: rename device struct to udevice
using UBI and DM together leads in compiler error, as both define a "struct device", so rename "struct device" in include/dm/device.h to "struct udevice", as we use linux code (MTD/UBI/UBIFS some USB code,...) and cannot change the linux "struct device" Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Marek Vasut <marex@denx.de>
Diffstat (limited to 'test/dm/test-driver.c')
-rw-r--r--test/dm/test-driver.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/dm/test-driver.c b/test/dm/test-driver.c
index c4be8a12d7..0f1a37b36e 100644
--- a/test/dm/test-driver.c
+++ b/test/dm/test-driver.c
@@ -18,7 +18,7 @@
int dm_testdrv_op_count[DM_TEST_OP_COUNT];
static struct dm_test_state *dms = &global_test_state;
-static int testdrv_ping(struct device *dev, int pingval, int *pingret)
+static int testdrv_ping(struct udevice *dev, int pingval, int *pingret)
{
const struct dm_test_pdata *pdata = dev_get_platdata(dev);
struct dm_test_priv *priv = dev_get_priv(dev);
@@ -33,7 +33,7 @@ static const struct test_ops test_ops = {
.ping = testdrv_ping,
};
-static int test_bind(struct device *dev)
+static int test_bind(struct udevice *dev)
{
/* Private data should not be allocated */
ut_assert(!dev_get_priv(dev));
@@ -42,7 +42,7 @@ static int test_bind(struct device *dev)
return 0;
}
-static int test_probe(struct device *dev)
+static int test_probe(struct udevice *dev)
{
struct dm_test_priv *priv = dev_get_priv(dev);
@@ -54,7 +54,7 @@ static int test_probe(struct device *dev)
return 0;
}
-static int test_remove(struct device *dev)
+static int test_remove(struct udevice *dev)
{
/* Private data should still be allocated */
ut_assert(dev_get_priv(dev));
@@ -63,7 +63,7 @@ static int test_remove(struct device *dev)
return 0;
}
-static int test_unbind(struct device *dev)
+static int test_unbind(struct udevice *dev)
{
/* Private data should not be allocated */
ut_assert(!dev->priv);
@@ -94,7 +94,7 @@ U_BOOT_DRIVER(test2_drv) = {
.priv_auto_alloc_size = sizeof(struct dm_test_priv),
};
-static int test_manual_drv_ping(struct device *dev, int pingval, int *pingret)
+static int test_manual_drv_ping(struct udevice *dev, int pingval, int *pingret)
{
*pingret = pingval + 2;
@@ -105,14 +105,14 @@ static const struct test_ops test_manual_ops = {
.ping = test_manual_drv_ping,
};
-static int test_manual_bind(struct device *dev)
+static int test_manual_bind(struct udevice *dev)
{
dm_testdrv_op_count[DM_TEST_OP_BIND]++;
return 0;
}
-static int test_manual_probe(struct device *dev)
+static int test_manual_probe(struct udevice *dev)
{
dm_testdrv_op_count[DM_TEST_OP_PROBE]++;
if (!dms->force_fail_alloc)
@@ -123,13 +123,13 @@ static int test_manual_probe(struct device *dev)
return 0;
}
-static int test_manual_remove(struct device *dev)
+static int test_manual_remove(struct udevice *dev)
{
dm_testdrv_op_count[DM_TEST_OP_REMOVE]++;
return 0;
}
-static int test_manual_unbind(struct device *dev)
+static int test_manual_unbind(struct udevice *dev)
{
dm_testdrv_op_count[DM_TEST_OP_UNBIND]++;
return 0;
OpenPOWER on IntegriCloud