diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-04-13 19:12:29 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-18 18:10:44 -0400 |
commit | 61c7a080a5a061c976988fd4b844dfb468dda255 (patch) | |
tree | 8cb492b73f2755c38a6164d770da34d5af6486a0 /drivers/spi/mpc52xx_spi.c | |
parent | d12d42f744f805a9ccc33cd76f04b237cd83ce56 (diff) |
of: Always use 'struct device.of_node' to get device node pointer.
The following structure elements duplicate the information in
'struct device.of_node' and so are being eliminated. This patch
makes all readers of these elements use device.of_node instead.
(struct of_device *)->node
(struct dev_archdata *)->prom_node (sparc)
(struct dev_archdata *)->of_node (powerpc & microblaze)
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 | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/spi/mpc52xx_spi.c b/drivers/spi/mpc52xx_spi.c index cd68f1ce5cc3..6573233bf7c9 100644 --- a/drivers/spi/mpc52xx_spi.c +++ b/drivers/spi/mpc52xx_spi.c | |||
@@ -403,7 +403,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op, | |||
403 | 403 | ||
404 | /* MMIO registers */ | 404 | /* MMIO registers */ |
405 | dev_dbg(&op->dev, "probing mpc5200 SPI device\n"); | 405 | dev_dbg(&op->dev, "probing mpc5200 SPI device\n"); |
406 | regs = of_iomap(op->node, 0); | 406 | regs = of_iomap(op->dev.of_node, 0); |
407 | if (!regs) | 407 | if (!regs) |
408 | return -ENODEV; | 408 | return -ENODEV; |
409 | 409 | ||
@@ -445,11 +445,11 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op, | |||
445 | ms = spi_master_get_devdata(master); | 445 | ms = spi_master_get_devdata(master); |
446 | ms->master = master; | 446 | ms->master = master; |
447 | ms->regs = regs; | 447 | ms->regs = regs; |
448 | ms->irq0 = irq_of_parse_and_map(op->node, 0); | 448 | ms->irq0 = irq_of_parse_and_map(op->dev.of_node, 0); |
449 | ms->irq1 = irq_of_parse_and_map(op->node, 1); | 449 | ms->irq1 = irq_of_parse_and_map(op->dev.of_node, 1); |
450 | ms->state = mpc52xx_spi_fsmstate_idle; | 450 | ms->state = mpc52xx_spi_fsmstate_idle; |
451 | ms->ipb_freq = mpc5xxx_get_bus_frequency(op->node); | 451 | ms->ipb_freq = mpc5xxx_get_bus_frequency(op->dev.of_node); |
452 | ms->gpio_cs_count = of_gpio_count(op->node); | 452 | ms->gpio_cs_count = of_gpio_count(op->dev.of_node); |
453 | if (ms->gpio_cs_count > 0) { | 453 | if (ms->gpio_cs_count > 0) { |
454 | master->num_chipselect = ms->gpio_cs_count; | 454 | master->num_chipselect = ms->gpio_cs_count; |
455 | ms->gpio_cs = kmalloc(ms->gpio_cs_count * sizeof(unsigned int), | 455 | ms->gpio_cs = kmalloc(ms->gpio_cs_count * sizeof(unsigned int), |
@@ -460,7 +460,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op, | |||
460 | } | 460 | } |
461 | 461 | ||
462 | for (i = 0; i < ms->gpio_cs_count; i++) { | 462 | for (i = 0; i < ms->gpio_cs_count; i++) { |
463 | gpio_cs = of_get_gpio(op->node, i); | 463 | gpio_cs = of_get_gpio(op->dev.of_node, i); |
464 | if (gpio_cs < 0) { | 464 | if (gpio_cs < 0) { |
465 | dev_err(&op->dev, | 465 | dev_err(&op->dev, |
466 | "could not parse the gpio field " | 466 | "could not parse the gpio field " |
@@ -512,7 +512,7 @@ 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->node); | 515 | of_register_spi_devices(master, op->dev.of_node); |
516 | dev_info(&ms->master->dev, "registered MPC5200 SPI bus\n"); | 516 | dev_info(&ms->master->dev, "registered MPC5200 SPI bus\n"); |
517 | 517 | ||
518 | return rc; | 518 | return rc; |