diff options
author | Anatolij Gustschin <agust@denx.de> | 2010-05-31 12:34:54 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-06-02 15:45:06 -0400 |
commit | ef7f2e831c3a563505c9bc5b16ef4bcae3cf4b53 (patch) | |
tree | 6c9d352875c6926cdb55bc13008fe176a0326439 /drivers/spi | |
parent | de2b606c24f178038b95a831f21a35a29faa6eab (diff) |
of/spi: mpc512x_psc_spi.c: Fix build failures
Fixes build errors caused by the:
- OF device_node pointer being moved into struct device
- removal of the match_table field from struct of_platform_driver
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/mpc512x_psc_spi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/spi/mpc512x_psc_spi.c b/drivers/spi/mpc512x_psc_spi.c index 28a126d2742b..2534b1ec3edd 100644 --- a/drivers/spi/mpc512x_psc_spi.c +++ b/drivers/spi/mpc512x_psc_spi.c | |||
@@ -512,29 +512,29 @@ static int __init mpc512x_psc_spi_of_probe(struct of_device *op, | |||
512 | u64 regaddr64, size64; | 512 | u64 regaddr64, size64; |
513 | s16 id = -1; | 513 | s16 id = -1; |
514 | 514 | ||
515 | regaddr_p = of_get_address(op->node, 0, &size64, NULL); | 515 | regaddr_p = of_get_address(op->dev.of_node, 0, &size64, NULL); |
516 | if (!regaddr_p) { | 516 | if (!regaddr_p) { |
517 | dev_err(&op->dev, "Invalid PSC address\n"); | 517 | dev_err(&op->dev, "Invalid PSC address\n"); |
518 | return -EINVAL; | 518 | return -EINVAL; |
519 | } | 519 | } |
520 | regaddr64 = of_translate_address(op->node, regaddr_p); | 520 | regaddr64 = of_translate_address(op->dev.of_node, regaddr_p); |
521 | 521 | ||
522 | /* get PSC id (0..11, used by port_config) */ | 522 | /* get PSC id (0..11, used by port_config) */ |
523 | if (op->dev.platform_data == NULL) { | 523 | if (op->dev.platform_data == NULL) { |
524 | const u32 *psc_nump; | 524 | const u32 *psc_nump; |
525 | 525 | ||
526 | psc_nump = of_get_property(op->node, "cell-index", NULL); | 526 | psc_nump = of_get_property(op->dev.of_node, "cell-index", NULL); |
527 | if (!psc_nump || *psc_nump > 11) { | 527 | if (!psc_nump || *psc_nump > 11) { |
528 | dev_err(&op->dev, "mpc512x_psc_spi: Device node %s " | 528 | dev_err(&op->dev, "mpc512x_psc_spi: Device node %s " |
529 | "has invalid cell-index property\n", | 529 | "has invalid cell-index property\n", |
530 | op->node->full_name); | 530 | op->dev.of_node->full_name); |
531 | return -EINVAL; | 531 | return -EINVAL; |
532 | } | 532 | } |
533 | id = *psc_nump; | 533 | id = *psc_nump; |
534 | } | 534 | } |
535 | 535 | ||
536 | return mpc512x_psc_spi_do_probe(&op->dev, (u32) regaddr64, (u32) size64, | 536 | return mpc512x_psc_spi_do_probe(&op->dev, (u32) regaddr64, (u32) size64, |
537 | irq_of_parse_and_map(op->node, 0), id); | 537 | irq_of_parse_and_map(op->dev.of_node, 0), id); |
538 | } | 538 | } |
539 | 539 | ||
540 | static int __exit mpc512x_psc_spi_of_remove(struct of_device *op) | 540 | static int __exit mpc512x_psc_spi_of_remove(struct of_device *op) |
@@ -550,12 +550,12 @@ static struct of_device_id mpc512x_psc_spi_of_match[] = { | |||
550 | MODULE_DEVICE_TABLE(of, mpc512x_psc_spi_of_match); | 550 | MODULE_DEVICE_TABLE(of, mpc512x_psc_spi_of_match); |
551 | 551 | ||
552 | static struct of_platform_driver mpc512x_psc_spi_of_driver = { | 552 | static struct of_platform_driver mpc512x_psc_spi_of_driver = { |
553 | .match_table = mpc512x_psc_spi_of_match, | ||
554 | .probe = mpc512x_psc_spi_of_probe, | 553 | .probe = mpc512x_psc_spi_of_probe, |
555 | .remove = __exit_p(mpc512x_psc_spi_of_remove), | 554 | .remove = __exit_p(mpc512x_psc_spi_of_remove), |
556 | .driver = { | 555 | .driver = { |
557 | .name = "mpc512x-psc-spi", | 556 | .name = "mpc512x-psc-spi", |
558 | .owner = THIS_MODULE, | 557 | .owner = THIS_MODULE, |
558 | .of_match_table = mpc512x_psc_spi_of_match, | ||
559 | }, | 559 | }, |
560 | }; | 560 | }; |
561 | 561 | ||