[PATCH 21/26] dm: core: Use dev_has_ofnode() instead of dev_of_valid()

Simon Glass sjg at chromium.org
Mon Dec 28 17:26:20 CET 2020


On Sat, Dec 19, 2020 at 10:40:13AM -0700, Simon Glass wrote:
> We have two functions which do the same thing. Standardise on
> dev_has_ofnode() since there is no such thing as an 'invalid' ofnode in
> normal operation: it is either null or missing.
>
> Also move the functions into one place.

Reviewed-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>

> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
>  drivers/clk/clk-uclass.c            |  2 +-
>  drivers/core/device.c               |  2 +-
>  drivers/gpio/sandbox.c              |  2 +-
>  drivers/i2c/designware_i2c_pci.c    |  4 ++--
>  drivers/i2c/i2c-uclass.c            |  2 +-
>  drivers/mmc/pci_mmc.c               |  2 +-
>  drivers/pci/pci-uclass.c            |  6 +++---
>  drivers/pinctrl/pinctrl-uclass.c    |  2 +-
>  drivers/spi/spi-uclass.c            |  2 +-
>  drivers/sysreset/sysreset_sandbox.c |  2 +-
>  drivers/timer/timer-uclass.c        |  2 +-
>  drivers/usb/host/usb-uclass.c       |  2 +-
>  include/dm/device.h                 | 13 ++++++++++++-
>  include/dm/read.h                   | 16 ----------------
>  test/dm/pci.c                       |  6 +++---
>  15 files changed, 30 insertions(+), 35 deletions(-)
>
Applied to u-boot-dm/next, thanks!


More information about the U-Boot mailing list