From: Patrick DELAUNAY Date: Mon, 4 Jan 2021 12:01:10 +0100 Subject: [PATCH 21/26] dm: core: Use dev_has_ofnode() instead of dev_of_valid() In-Reply-To: <20201219174018.1114146-20-sjg@chromium.org> References: <20201219174018.1114146-1-sjg@chromium.org> <20201219174018.1114146-20-sjg@chromium.org> Message-ID: <8666cafe-cfdc-e24c-5c6e-847d9c2e8479@foss.st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > --- > > 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