aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/au1000_generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/au1000_generic.c')
-rw-r--r--drivers/pcmcia/au1000_generic.c29
1 files changed, 3 insertions, 26 deletions
diff --git a/drivers/pcmcia/au1000_generic.c b/drivers/pcmcia/au1000_generic.c
index 470ef756252e..ba48cef3a9dc 100644
--- a/drivers/pcmcia/au1000_generic.c
+++ b/drivers/pcmcia/au1000_generic.c
@@ -490,7 +490,7 @@ int au1x00_drv_pcmcia_remove(struct device *dev)
490 flush_scheduled_work(); 490 flush_scheduled_work();
491 skt->ops->hw_shutdown(skt); 491 skt->ops->hw_shutdown(skt);
492 au1x00_pcmcia_config_skt(skt, &dead_socket); 492 au1x00_pcmcia_config_skt(skt, &dead_socket);
493 iounmap(skt->virt_io); 493 iounmap(skt->virt_io + (u32)mips_io_port_base);
494 skt->virt_io = NULL; 494 skt->virt_io = NULL;
495 } 495 }
496 496
@@ -519,36 +519,15 @@ static int au1x00_drv_pcmcia_probe(struct device *dev)
519} 519}
520 520
521 521
522static int au1x00_drv_pcmcia_suspend(struct device *dev, pm_message_t state, u32 level)
523{
524 int ret = 0;
525 if (level == SUSPEND_SAVE_STATE)
526 ret = pcmcia_socket_dev_suspend(dev, state);
527 return ret;
528}
529
530static int au1x00_drv_pcmcia_resume(struct device *dev, u32 level)
531{
532 int ret = 0;
533 if (level == RESUME_RESTORE_STATE)
534 ret = pcmcia_socket_dev_resume(dev);
535 return ret;
536}
537
538
539static struct device_driver au1x00_pcmcia_driver = { 522static struct device_driver au1x00_pcmcia_driver = {
540 .probe = au1x00_drv_pcmcia_probe, 523 .probe = au1x00_drv_pcmcia_probe,
541 .remove = au1x00_drv_pcmcia_remove, 524 .remove = au1x00_drv_pcmcia_remove,
542 .name = "au1x00-pcmcia", 525 .name = "au1x00-pcmcia",
543 .bus = &platform_bus_type, 526 .bus = &platform_bus_type,
544 .suspend = au1x00_drv_pcmcia_suspend, 527 .suspend = pcmcia_socket_dev_suspend,
545 .resume = au1x00_drv_pcmcia_resume 528 .resume = pcmcia_socket_dev_resume,
546}; 529};
547 530
548static struct platform_device au1x00_device = {
549 .name = "au1x00-pcmcia",
550 .id = 0,
551};
552 531
553/* au1x00_pcmcia_init() 532/* au1x00_pcmcia_init()
554 * 533 *
@@ -562,7 +541,6 @@ static int __init au1x00_pcmcia_init(void)
562 int error = 0; 541 int error = 0;
563 if ((error = driver_register(&au1x00_pcmcia_driver))) 542 if ((error = driver_register(&au1x00_pcmcia_driver)))
564 return error; 543 return error;
565 platform_device_register(&au1x00_device);
566 return error; 544 return error;
567} 545}
568 546
@@ -573,7 +551,6 @@ static int __init au1x00_pcmcia_init(void)
573static void __exit au1x00_pcmcia_exit(void) 551static void __exit au1x00_pcmcia_exit(void)
574{ 552{
575 driver_unregister(&au1x00_pcmcia_driver); 553 driver_unregister(&au1x00_pcmcia_driver);
576 platform_device_unregister(&au1x00_device);
577} 554}
578 555
579module_init(au1x00_pcmcia_init); 556module_init(au1x00_pcmcia_init);