diff options
Diffstat (limited to 'drivers/spi/mpc52xx_psc_spi.c')
-rw-r--r-- | drivers/spi/mpc52xx_psc_spi.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c index 7104cb739da7..66d170147dcc 100644 --- a/drivers/spi/mpc52xx_psc_spi.c +++ b/drivers/spi/mpc52xx_psc_spi.c | |||
@@ -16,8 +16,8 @@ | |||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/of_address.h> | ||
19 | #include <linux/of_platform.h> | 20 | #include <linux/of_platform.h> |
20 | #include <linux/of_spi.h> | ||
21 | #include <linux/workqueue.h> | 21 | #include <linux/workqueue.h> |
22 | #include <linux/completion.h> | 22 | #include <linux/completion.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
@@ -398,6 +398,7 @@ static int __init mpc52xx_psc_spi_do_probe(struct device *dev, u32 regaddr, | |||
398 | master->setup = mpc52xx_psc_spi_setup; | 398 | master->setup = mpc52xx_psc_spi_setup; |
399 | master->transfer = mpc52xx_psc_spi_transfer; | 399 | master->transfer = mpc52xx_psc_spi_transfer; |
400 | master->cleanup = mpc52xx_psc_spi_cleanup; | 400 | master->cleanup = mpc52xx_psc_spi_cleanup; |
401 | master->dev.of_node = dev->of_node; | ||
401 | 402 | ||
402 | mps->psc = ioremap(regaddr, size); | 403 | mps->psc = ioremap(regaddr, size); |
403 | if (!mps->psc) { | 404 | if (!mps->psc) { |
@@ -470,7 +471,6 @@ static int __init mpc52xx_psc_spi_of_probe(struct of_device *op, | |||
470 | const u32 *regaddr_p; | 471 | const u32 *regaddr_p; |
471 | u64 regaddr64, size64; | 472 | u64 regaddr64, size64; |
472 | s16 id = -1; | 473 | s16 id = -1; |
473 | int rc; | ||
474 | 474 | ||
475 | regaddr_p = of_get_address(op->dev.of_node, 0, &size64, NULL); | 475 | regaddr_p = of_get_address(op->dev.of_node, 0, &size64, NULL); |
476 | if (!regaddr_p) { | 476 | if (!regaddr_p) { |
@@ -491,13 +491,8 @@ static int __init mpc52xx_psc_spi_of_probe(struct of_device *op, | |||
491 | id = *psc_nump + 1; | 491 | id = *psc_nump + 1; |
492 | } | 492 | } |
493 | 493 | ||
494 | rc = mpc52xx_psc_spi_do_probe(&op->dev, (u32)regaddr64, (u32)size64, | 494 | return mpc52xx_psc_spi_do_probe(&op->dev, (u32)regaddr64, (u32)size64, |
495 | irq_of_parse_and_map(op->dev.of_node, 0), id); | 495 | irq_of_parse_and_map(op->dev.of_node, 0), id); |
496 | if (rc == 0) | ||
497 | of_register_spi_devices(dev_get_drvdata(&op->dev), | ||
498 | op->dev.of_node); | ||
499 | |||
500 | return rc; | ||
501 | } | 496 | } |
502 | 497 | ||
503 | static int __exit mpc52xx_psc_spi_of_remove(struct of_device *op) | 498 | static int __exit mpc52xx_psc_spi_of_remove(struct of_device *op) |