summaryrefslogtreecommitdiff
path: root/drivers/spi/mpc52xx_spi.c
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 /drivers/spi/mpc52xx_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/mpc52xx_spi.c')
-rw-r--r--drivers/spi/mpc52xx_spi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/spi/mpc52xx_spi.c b/drivers/spi/mpc52xx_spi.c
index b1a76bff775f..56136ff00e01 100644
--- a/drivers/spi/mpc52xx_spi.c
+++ b/drivers/spi/mpc52xx_spi.c
@@ -18,7 +18,6 @@
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/spi/spi.h>
-#include <linux/of_spi.h>
#include <linux/io.h>
#include <linux/of_gpio.h>
#include <linux/slab.h>
@@ -439,6 +438,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op,
master->setup = mpc52xx_spi_setup;
master->transfer = mpc52xx_spi_transfer;
master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST;
+ master->dev.of_node = op->dev.of_node;
dev_set_drvdata(&op->dev, master);
@@ -512,7 +512,6 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op,
if (rc)
goto err_register;
- of_register_spi_devices(master, op->dev.of_node);
dev_info(&ms->master->dev, "registered MPC5200 SPI bus\n");
return rc;