@@ -2566,7 +2566,7 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi,
return 0;
}
-static struct spi_device *
+struct spi_device *
of_register_spi_device(struct spi_controller *ctlr, struct device_node *nc)
{
struct spi_device *spi;
@@ -2612,6 +2612,7 @@ of_register_spi_device(struct spi_controller *ctlr, struct device_node *nc)
spi_dev_put(spi);
return ERR_PTR(rc);
}
+EXPORT_SYMBOL_GPL(of_register_spi_device);
/**
* of_register_spi_devices() - Register child devices onto the SPI bus
@@ -1686,6 +1686,9 @@ spi_transfer_is_last(struct spi_controller *ctlr, struct spi_transfer *xfer)
#if IS_ENABLED(CONFIG_OF)
struct spi_controller *of_find_spi_controller_by_node(struct device_node *node);
+
+struct spi_device *
+of_register_spi_device(struct spi_controller *ctlr, struct device_node *nc);
#endif
#endif /* __LINUX_SPI_H */
DONOTMERGE Export of_register_spi_device() from SPI Core to allow registering SPI devices from device tree when the device node is not a child node of spi controller. Signed-off-by: Ayush Singh <ayush@beagleboard.org> --- drivers/spi/spi.c | 3 ++- include/linux/spi/spi.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-)