diff options
author | Anatolij Gustschin <agust@denx.de> | 2010-07-27 16:35:58 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-30 02:03:59 -0400 |
commit | 12b15e83289bc7cf2ec9a342412e0c955beeb395 (patch) | |
tree | da1560511f56a9c63246be0ff449229c7adf36b1 /drivers/spi/mpc52xx_spi.c | |
parent | 559e2b7ee7a1c7753d534abcb2742a4775339293 (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.c | 3 |
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 @@ | |||
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
20 | #include <linux/spi/spi.h> | 20 | #include <linux/spi/spi.h> |
21 | #include <linux/of_spi.h> | ||
22 | #include <linux/io.h> | 21 | #include <linux/io.h> |
23 | #include <linux/of_gpio.h> | 22 | #include <linux/of_gpio.h> |
24 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
@@ -439,6 +438,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op, | |||
439 | master->setup = mpc52xx_spi_setup; | 438 | master->setup = mpc52xx_spi_setup; |
440 | master->transfer = mpc52xx_spi_transfer; | 439 | master->transfer = mpc52xx_spi_transfer; |
441 | master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST; | 440 | master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST; |
441 | master->dev.of_node = op->dev.of_node; | ||
442 | 442 | ||
443 | dev_set_drvdata(&op->dev, master); | 443 | dev_set_drvdata(&op->dev, master); |
444 | 444 | ||
@@ -512,7 +512,6 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op, | |||
512 | if (rc) | 512 | if (rc) |
513 | goto err_register; | 513 | goto err_register; |
514 | 514 | ||
515 | of_register_spi_devices(master, op->dev.of_node); | ||
516 | dev_info(&ms->master->dev, "registered MPC5200 SPI bus\n"); | 515 | dev_info(&ms->master->dev, "registered MPC5200 SPI bus\n"); |
517 | 516 | ||
518 | return rc; | 517 | return rc; |