aboutsummaryrefslogtreecommitdiff
path: root/include/linux/of_spi.h
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2010-07-27 22:35:58 +0200
committerGrant Likely <grant.likely@secretlab.ca>2010-07-30 00:03:59 -0600
commit12b15e83289bc7cf2ec9a342412e0c955beeb395 (patch)
treeda1560511f56a9c63246be0ff449229c7adf36b1 /include/linux/of_spi.h
parent559e2b7ee7a1c7753d534abcb2742a4775339293 (diff)
of/spi: call of_register_spi_devices() from spi core code
Move of_register_spi_devices() call from drivers to spi_register_master(). Also change the function to use the struct device_node pointer from master spi device instead of passing it as function argument. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include/linux/of_spi.h')
-rw-r--r--include/linux/of_spi.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/of_spi.h b/include/linux/of_spi.h
index 5f71ee8c086..9e3e70f78ae 100644
--- a/include/linux/of_spi.h
+++ b/include/linux/of_spi.h
@@ -9,10 +9,15 @@
#ifndef __LINUX_OF_SPI_H
#define __LINUX_OF_SPI_H
-#include <linux/of.h>
#include <linux/spi/spi.h>
-extern void of_register_spi_devices(struct spi_master *master,
- struct device_node *np);
+#if defined(CONFIG_OF_SPI) || defined(CONFIG_OF_SPI_MODULE)
+extern void of_register_spi_devices(struct spi_master *master);
+#else
+static inline void of_register_spi_devices(struct spi_master *master)
+{
+ return;
+}
+#endif /* CONFIG_OF_SPI */
#endif /* __LINUX_OF_SPI */