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_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, | |||
407 | master = spi_alloc_master(dev, sizeof *hw); | 407 | master = spi_alloc_master(dev, sizeof *hw); |
408 | if (master == NULL) | 408 | if (master == NULL) |
409 | return -ENOMEM; | 409 | return -ENOMEM; |
410 | master->dev.of_node = np; | ||
410 | dev_set_drvdata(dev, master); | 411 | dev_set_drvdata(dev, master); |
411 | hw = spi_master_get_devdata(master); | 412 | hw = spi_master_get_devdata(master); |
412 | hw->master = spi_master_get(master); | 413 | hw->master = spi_master_get(master); |
@@ -545,7 +546,6 @@ static int __init spi_ppc4xx_of_probe(struct of_device *op, | |||
545 | } | 546 | } |
546 | 547 | ||
547 | dev_info(dev, "driver initialized\n"); | 548 | dev_info(dev, "driver initialized\n"); |
548 | of_register_spi_devices(master, np); | ||
549 | 549 | ||
550 | return 0; | 550 | return 0; |
551 | 551 | ||