diff options
author | Anatolij Gustschin <agust@denx.de> | 2010-07-27 22:35:58 +0200 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-30 00:03:59 -0600 |
commit | 12b15e83289bc7cf2ec9a342412e0c955beeb395 (patch) | |
tree | da1560511f56a9c63246be0ff449229c7adf36b1 /include/linux/of_spi.h | |
parent | 559e2b7ee7a1c7753d534abcb2742a4775339293 (diff) | |
download | talos-obmc-linux-12b15e83289bc7cf2ec9a342412e0c955beeb395.tar.gz talos-obmc-linux-12b15e83289bc7cf2ec9a342412e0c955beeb395.zip |
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.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/of_spi.h b/include/linux/of_spi.h index 5f71ee8c0868..9e3e70f78ae6 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 */ |