summaryrefslogtreecommitdiff
path: root/test/dm/test-uclass.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-uclass.c
parent9665fa8f9e1488209d5e01d0792c243e0a220c5a (diff)
downloadu-boot-54c5d08a09e631f88738db54c75395c6457c2157.tar.gz
u-boot-54c5d08a09e631f88738db54c75395c6457c2157.tar.bz2
u-boot-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-uclass.c')
-rw-r--r--test/dm/test-uclass.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/test/dm/test-uclass.c b/test/dm/test-uclass.c
index 8b564b89d9..017e097928 100644
--- a/test/dm/test-uclass.c
+++ b/test/dm/test-uclass.c
@@ -18,7 +18,7 @@
static struct dm_test_state *dms = &global_test_state;
-int test_ping(struct device *dev, int pingval, int *pingret)
+int test_ping(struct udevice *dev, int pingval, int *pingret)
{
const struct test_ops *ops = device_get_ops(dev);
@@ -28,24 +28,25 @@ int test_ping(struct device *dev, int pingval, int *pingret)
return ops->ping(dev, pingval, pingret);
}
-static int test_post_bind(struct device *dev)
+static int test_post_bind(struct udevice *dev)
{
dm_testdrv_op_count[DM_TEST_OP_POST_BIND]++;
return 0;
}
-static int test_pre_unbind(struct device *dev)
+static int test_pre_unbind(struct udevice *dev)
{
dm_testdrv_op_count[DM_TEST_OP_PRE_UNBIND]++;
return 0;
}
-static int test_post_probe(struct device *dev)
+static int test_post_probe(struct udevice *dev)
{
- struct device *prev = list_entry(dev->uclass_node.prev, struct device,
- uclass_node);
+ struct udevice *prev = list_entry(dev->uclass_node.prev,
+ struct udevice, uclass_node);
+
struct dm_test_uclass_perdev_priv *priv = dev->uclass_priv;
struct uclass *uc = dev->uclass;
@@ -68,7 +69,7 @@ static int test_post_probe(struct device *dev)
return 0;
}
-static int test_pre_remove(struct device *dev)
+static int test_pre_remove(struct udevice *dev)
{
dm_testdrv_op_count[DM_TEST_OP_PRE_REMOVE]++;