diff options
Diffstat (limited to 'drivers/spi/mpc52xx_psc_spi.c')
-rw-r--r-- | drivers/spi/mpc52xx_psc_spi.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c index 1b74d5ca03f3..a14e9fdc0065 100644 --- a/drivers/spi/mpc52xx_psc_spi.c +++ b/drivers/spi/mpc52xx_psc_spi.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/of_platform.h> | 19 | #include <linux/of_platform.h> |
20 | #include <linux/of_spi.h> | ||
20 | #include <linux/workqueue.h> | 21 | #include <linux/workqueue.h> |
21 | #include <linux/completion.h> | 22 | #include <linux/completion.h> |
22 | #include <linux/io.h> | 23 | #include <linux/io.h> |
@@ -464,6 +465,7 @@ static int __init mpc52xx_psc_spi_of_probe(struct of_device *op, | |||
464 | const u32 *regaddr_p; | 465 | const u32 *regaddr_p; |
465 | u64 regaddr64, size64; | 466 | u64 regaddr64, size64; |
466 | s16 id = -1; | 467 | s16 id = -1; |
468 | int rc; | ||
467 | 469 | ||
468 | regaddr_p = of_get_address(op->node, 0, &size64, NULL); | 470 | regaddr_p = of_get_address(op->node, 0, &size64, NULL); |
469 | if (!regaddr_p) { | 471 | if (!regaddr_p) { |
@@ -485,8 +487,12 @@ static int __init mpc52xx_psc_spi_of_probe(struct of_device *op, | |||
485 | id = *psc_nump + 1; | 487 | id = *psc_nump + 1; |
486 | } | 488 | } |
487 | 489 | ||
488 | return mpc52xx_psc_spi_do_probe(&op->dev, (u32)regaddr64, (u32)size64, | 490 | rc = mpc52xx_psc_spi_do_probe(&op->dev, (u32)regaddr64, (u32)size64, |
489 | irq_of_parse_and_map(op->node, 0), id); | 491 | irq_of_parse_and_map(op->node, 0), id); |
492 | if (rc == 0) | ||
493 | of_register_spi_devices(dev_get_drvdata(&op->dev), op->node); | ||
494 | |||
495 | return rc; | ||
490 | } | 496 | } |
491 | 497 | ||
492 | 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) |