summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-09-28 22:52:25 +0900
committerSimon Glass <sjg@chromium.org>2014-10-22 10:32:16 -0600
commit29a1bedbf33d788646b51391bb116e481b9f0b45 (patch)
tree56b7cc6ef2a04ddc38e508335cfe2d0ce4ee4ff9 /drivers
parent81b4e751c2bb9d9c769c2b55273944f70f9abc95 (diff)
downloadu-boot-imx-29a1bedbf33d788646b51391bb116e481b9f0b45.zip
u-boot-imx-29a1bedbf33d788646b51391bb116e481b9f0b45.tar.gz
u-boot-imx-29a1bedbf33d788646b51391bb116e481b9f0b45.tar.bz2
dm: do not check the existence of uclass operation
The function uclass_add() checks uc_drv->ops as follows: if (uc_drv->ops) { dm_warn("No ops for uclass id %d\n", id); return -EINVAL; } It seems odd because it warns "No ops" when uc_drv->ops has non-NULL pointer. (Looks opposite.) Anyway, most of UCLASS_DRIVER entries have no .ops member. This check makes no sense. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/core/uclass.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
index 61ca17e..901b06e 100644
--- a/drivers/core/uclass.c
+++ b/drivers/core/uclass.c
@@ -60,10 +60,6 @@ static int uclass_add(enum uclass_id id, struct uclass **ucp)
id);
return -ENOENT;
}
- if (uc_drv->ops) {
- dm_warn("No ops for uclass id %d\n", id);
- return -EINVAL;
- }
uc = calloc(1, sizeof(*uc));
if (!uc)
return -ENOMEM;