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 /drivers/spi/spi.c | |
parent | 559e2b7ee7a1c7753d534abcb2742a4775339293 (diff) | |
download | op-kernel-dev-12b15e83289bc7cf2ec9a342412e0c955beeb395.zip op-kernel-dev-12b15e83289bc7cf2ec9a342412e0c955beeb395.tar.gz |
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 'drivers/spi/spi.c')
-rw-r--r-- | drivers/spi/spi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index b3a1f92..1bb1b88 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -26,6 +26,7 @@ #include <linux/slab.h> #include <linux/mod_devicetable.h> #include <linux/spi/spi.h> +#include <linux/of_spi.h> /* SPI bustype and spi_master class are registered after board init code @@ -540,6 +541,9 @@ int spi_register_master(struct spi_master *master) /* populate children from any spi device tables */ scan_boardinfo(master); status = 0; + + /* Register devices from the device tree */ + of_register_spi_devices(master); done: return status; } |