aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/mpc52xx_psc_spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/mpc52xx_psc_spi.c')
-rw-r--r--drivers/spi/mpc52xx_psc_spi.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c
index cdb3d3191719..0debe11b67b4 100644
--- a/drivers/spi/mpc52xx_psc_spi.c
+++ b/drivers/spi/mpc52xx_psc_spi.c
@@ -15,13 +15,7 @@
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/errno.h> 16#include <linux/errno.h>
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18
19#if defined(CONFIG_PPC_MERGE)
20#include <linux/of_platform.h> 18#include <linux/of_platform.h>
21#else
22#include <linux/platform_device.h>
23#endif
24
25#include <linux/workqueue.h> 19#include <linux/workqueue.h>
26#include <linux/completion.h> 20#include <linux/completion.h>
27#include <linux/io.h> 21#include <linux/io.h>
@@ -471,53 +465,6 @@ static int __exit mpc52xx_psc_spi_do_remove(struct device *dev)
471 return 0; 465 return 0;
472} 466}
473 467
474#if !defined(CONFIG_PPC_MERGE)
475static int __init mpc52xx_psc_spi_probe(struct platform_device *dev)
476{
477 switch(dev->id) {
478 case 1:
479 case 2:
480 case 3:
481 case 6:
482 return mpc52xx_psc_spi_do_probe(&dev->dev,
483 MPC52xx_PA(MPC52xx_PSCx_OFFSET(dev->id)),
484 MPC52xx_PSC_SIZE, platform_get_irq(dev, 0), dev->id);
485 default:
486 return -EINVAL;
487 }
488}
489
490static int __exit mpc52xx_psc_spi_remove(struct platform_device *dev)
491{
492 return mpc52xx_psc_spi_do_remove(&dev->dev);
493}
494
495/* work with hotplug and coldplug */
496MODULE_ALIAS("platform:mpc52xx-psc-spi");
497
498static struct platform_driver mpc52xx_psc_spi_platform_driver = {
499 .remove = __exit_p(mpc52xx_psc_spi_remove),
500 .driver = {
501 .name = "mpc52xx-psc-spi",
502 .owner = THIS_MODULE,
503 },
504};
505
506static int __init mpc52xx_psc_spi_init(void)
507{
508 return platform_driver_probe(&mpc52xx_psc_spi_platform_driver,
509 mpc52xx_psc_spi_probe);
510}
511module_init(mpc52xx_psc_spi_init);
512
513static void __exit mpc52xx_psc_spi_exit(void)
514{
515 platform_driver_unregister(&mpc52xx_psc_spi_platform_driver);
516}
517module_exit(mpc52xx_psc_spi_exit);
518
519#else /* defined(CONFIG_PPC_MERGE) */
520
521static int __init mpc52xx_psc_spi_of_probe(struct of_device *op, 468static int __init mpc52xx_psc_spi_of_probe(struct of_device *op,
522 const struct of_device_id *match) 469 const struct of_device_id *match)
523{ 470{
@@ -586,8 +533,6 @@ static void __exit mpc52xx_psc_spi_exit(void)
586} 533}
587module_exit(mpc52xx_psc_spi_exit); 534module_exit(mpc52xx_psc_spi_exit);
588 535
589#endif /* defined(CONFIG_PPC_MERGE) */
590
591MODULE_AUTHOR("Dragos Carp"); 536MODULE_AUTHOR("Dragos Carp");
592MODULE_DESCRIPTION("MPC52xx PSC SPI Driver"); 537MODULE_DESCRIPTION("MPC52xx PSC SPI Driver");
593MODULE_LICENSE("GPL"); 538MODULE_LICENSE("GPL");