diff options
author | Anatolij Gustschin <agust@denx.de> | 2010-07-27 22:35:58 +0200 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-07-30 00:03:59 -0600 |
commit | 12b15e83289bc7cf2ec9a342412e0c955beeb395 (patch) | |
tree | da1560511f56a9c63246be0ff449229c7adf36b1 /drivers/spi/spi_ppc4xx.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_ppc4xx.c')
-rw-r--r-- | drivers/spi/spi_ppc4xx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi_ppc4xx.c b/drivers/spi/spi_ppc4xx.c index d53466a249d9..0f5fa7e2a550 100644 --- a/drivers/spi/spi_ppc4xx.c +++ b/drivers/spi/spi_ppc4xx.c @@ -407,6 +407,7 @@ static int __init spi_ppc4xx_of_probe(struct of_device *op, master = spi_alloc_master(dev, sizeof *hw); if (master == NULL) return -ENOMEM; + master->dev.of_node = np; dev_set_drvdata(dev, master); hw = spi_master_get_devdata(master); hw->master = spi_master_get(master); @@ -545,7 +546,6 @@ static int __init spi_ppc4xx_of_probe(struct of_device *op, } dev_info(dev, "driver initialized\n"); - of_register_spi_devices(master, np); return 0; |