summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-10-21 17:00:17 +0100
committerMark Brown <broonie@kernel.org>2018-10-21 17:00:17 +0100
commit7b9734dbc5b042bb8d8d930797f346b280057c4e (patch)
treec4b5f1c1600e1a5f6fc0b17a56a89682f127e6e2 /drivers/spi
parent4b51c747e4a52175e63d125db8365b38b06f0343 (diff)
parent5f143af7501e7c435c56e181a655493edaa92509 (diff)
Merge remote-tracking branch 'spi/topic/of' into spi-next
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 42da9cf771e8..6ca59406b0b7 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -3398,20 +3398,23 @@ EXPORT_SYMBOL_GPL(spi_write_then_read);
/*-------------------------------------------------------------------------*/
-#if IS_ENABLED(CONFIG_OF_DYNAMIC)
+#if IS_ENABLED(CONFIG_OF)
static int __spi_of_device_match(struct device *dev, void *data)
{
return dev->of_node == data;
}
/* must call put_device() when done with returned spi_device device */
-static struct spi_device *of_find_spi_device_by_node(struct device_node *node)
+struct spi_device *of_find_spi_device_by_node(struct device_node *node)
{
struct device *dev = bus_find_device(&spi_bus_type, NULL, node,
__spi_of_device_match);
return dev ? to_spi_device(dev) : NULL;
}
+EXPORT_SYMBOL_GPL(of_find_spi_device_by_node);
+#endif /* IS_ENABLED(CONFIG_OF) */
+#if IS_ENABLED(CONFIG_OF_DYNAMIC)
static int __spi_of_controller_match(struct device *dev, const void *data)
{
return dev->of_node == data;