From 6a6d8fbef7eb801a6babad8a62b1318d098ed7ed Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 11 Jun 2014 23:29:48 -0600 Subject: dm: Add missing header files in lists and root These files don't compile in some architectures. Fix it by adding the missing headers. Signed-off-by: Simon Glass --- drivers/core/root.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/core/root.c') diff --git a/drivers/core/root.c b/drivers/core/root.c index 4977875c7f9..f31be72cd05 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3 From 89876a55a62f495302e2fd76094e45a65ca188b2 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 11 Jun 2014 23:29:49 -0600 Subject: dm: Cast away the const-ness of the global_data pointer In a very few cases we need to adjust the driver model root device, such as when setting it up at initialisation. Add a macro to make this easier. Signed-off-by: Simon Glass --- drivers/core/root.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/core/root.c') diff --git a/drivers/core/root.c b/drivers/core/root.c index f31be72cd05..1cbb096494d 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c @@ -43,9 +43,9 @@ int dm_init(void) dm_warn("Virtual root driver already exists!\n"); return -EINVAL; } - INIT_LIST_HEAD(&gd->uclass_root); + INIT_LIST_HEAD(&DM_UCLASS_ROOT_NON_CONST); - ret = device_bind_by_name(NULL, &root_info, &gd->dm_root); + ret = device_bind_by_name(NULL, &root_info, &DM_ROOT_NON_CONST); if (ret) return ret; @@ -56,7 +56,7 @@ int dm_scan_platdata(void) { int ret; - ret = lists_bind_drivers(gd->dm_root); + ret = lists_bind_drivers(DM_ROOT_NON_CONST); if (ret == -ENOENT) { dm_warn("Some drivers were not found\n"); ret = 0; -- cgit v1.2.3