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/spi_mpc8xxx.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/spi_mpc8xxx.c')
-rw-r--r-- | drivers/spi/spi_mpc8xxx.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c index 97ab0a81338a..aad9ae1b9c69 100644 --- a/drivers/spi/spi_mpc8xxx.c +++ b/drivers/spi/spi_mpc8xxx.c | |||
@@ -38,7 +38,6 @@ | |||
38 | #include <linux/of_platform.h> | 38 | #include <linux/of_platform.h> |
39 | #include <linux/gpio.h> | 39 | #include <linux/gpio.h> |
40 | #include <linux/of_gpio.h> | 40 | #include <linux/of_gpio.h> |
41 | #include <linux/of_spi.h> | ||
42 | #include <linux/slab.h> | 41 | #include <linux/slab.h> |
43 | 42 | ||
44 | #include <sysdev/fsl_soc.h> | 43 | #include <sysdev/fsl_soc.h> |
@@ -1009,6 +1008,7 @@ mpc8xxx_spi_probe(struct device *dev, struct resource *mem, unsigned int irq) | |||
1009 | master->setup = mpc8xxx_spi_setup; | 1008 | master->setup = mpc8xxx_spi_setup; |
1010 | master->transfer = mpc8xxx_spi_transfer; | 1009 | master->transfer = mpc8xxx_spi_transfer; |
1011 | master->cleanup = mpc8xxx_spi_cleanup; | 1010 | master->cleanup = mpc8xxx_spi_cleanup; |
1011 | master->dev.of_node = dev->of_node; | ||
1012 | 1012 | ||
1013 | mpc8xxx_spi = spi_master_get_devdata(master); | 1013 | mpc8xxx_spi = spi_master_get_devdata(master); |
1014 | mpc8xxx_spi->dev = dev; | 1014 | mpc8xxx_spi->dev = dev; |
@@ -1299,8 +1299,6 @@ static int __devinit of_mpc8xxx_spi_probe(struct of_device *ofdev, | |||
1299 | goto err; | 1299 | goto err; |
1300 | } | 1300 | } |
1301 | 1301 | ||
1302 | of_register_spi_devices(master, np); | ||
1303 | |||
1304 | return 0; | 1302 | return 0; |
1305 | 1303 | ||
1306 | err: | 1304 | err: |