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>
This commit is contained in:
committed by
Grant Likely
parent
559e2b7ee7
commit
12b15e8328
@@ -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;
|
||||
|
Reference in New Issue
Block a user