]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
dm: do not check the existence of uclass operation
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Sun, 28 Sep 2014 13:52:25 +0000 (22:52 +0900)
committerSimon Glass <sjg@chromium.org>
Wed, 22 Oct 2014 16:32:16 +0000 (10:32 -0600)
commit29a1bedbf33d788646b51391bb116e481b9f0b45
tree56b7cc6ef2a04ddc38e508335cfe2d0ce4ee4ff9
parent81b4e751c2bb9d9c769c2b55273944f70f9abc95
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>
drivers/core/uclass.c