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

Patrick DELAUNAY
2021-01-04T11:01:10Z

Hi Simon,

On 12/19/20 6:40 PM, 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.
>
> Signed-off-by: Simon Glass <sjg@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(-)
>
Reviewed-by: Patrick Delaunay

Thanks

Patrick