In preparation to class_find_device_by_of_node() going away switch to using class_find_device_by_fwnode(). Signed-off-by: Dmitry Torokhov --- drivers/spi/spi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index bf1df365f795..071a9ffdb59d 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -4948,11 +4949,12 @@ EXPORT_SYMBOL_GPL(spi_write_then_read); /* The spi controllers are not using spi_bus, so we find it with another way */ struct spi_controller *of_find_spi_controller_by_node(struct device_node *node) { + struct fwnode_handle *fwnode = of_fwnode_handle(node); struct device *dev; - dev = class_find_device_by_of_node(&spi_controller_class, node); + dev = class_find_device_by_fwnode(&spi_controller_class, fwnode); if (!dev && IS_ENABLED(CONFIG_SPI_SLAVE)) - dev = class_find_device_by_of_node(&spi_target_class, node); + dev = class_find_device_by_fwnode(&spi_target_class, fwnode); if (!dev) return NULL; -- 2.53.0.959.g497ff81fa9-goog