aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi.c
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2010-07-27 16:35:58 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-07-30 02:03:59 -0400
commit12b15e83289bc7cf2ec9a342412e0c955beeb395 (patch)
treeda1560511f56a9c63246be0ff449229c7adf36b1 /drivers/spi/spi.c
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 'drivers/spi/spi.c')
-rw-r--r--drivers/spi/spi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index b3a1f9259b62..1bb1b88780ce 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -26,6 +26,7 @@
26#include <linux/slab.h> 26#include <linux/slab.h>
27#include <linux/mod_devicetable.h> 27#include <linux/mod_devicetable.h>
28#include <linux/spi/spi.h> 28#include <linux/spi/spi.h>
29#include <linux/of_spi.h>
29 30
30 31
31/* SPI bustype and spi_master class are registered after board init code 32/* SPI bustype and spi_master class are registered after board init code
@@ -540,6 +541,9 @@ int spi_register_master(struct spi_master *master)
540 /* populate children from any spi device tables */ 541 /* populate children from any spi device tables */
541 scan_boardinfo(master); 542 scan_boardinfo(master);
542 status = 0; 543 status = 0;
544
545 /* Register devices from the device tree */
546 of_register_spi_devices(master);
543done: 547done:
544 return status; 548 return status;
545} 549}