aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/m32r_cfc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 14:17:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 14:17:04 -0400
commit0c93ea4064a209cdc36de8a9a3003d43d08f46f7 (patch)
treeff19952407c523a1349ef56c05993416dd28437e /drivers/pcmcia/m32r_cfc.c
parentbc2fd381d8f9dbeb181f82286cdca1567e3d0def (diff)
parente6e66b02e11563abdb7f69dcb7a2efbd8d577e77 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (61 commits) Dynamic debug: fix pr_fmt() build error Dynamic debug: allow simple quoting of words dynamic debug: update docs dynamic debug: combine dprintk and dynamic printk sysfs: fix some bin_vm_ops errors kobject: don't block for each kobject_uevent sysfs: only allow one scheduled removal callback per kobj Driver core: Fix device_move() vs. dpm list ordering, v2 Driver core: some cleanup on drivers/base/sys.c Driver core: implement uevent suppress in kobject vcs: hook sysfs devices into object lifetime instead of "binding" driver core: fix passing platform_data driver core: move platform_data into platform_device sysfs: don't block indefinitely for unmapped files. driver core: move knode_bus into private structure driver core: move knode_driver into private structure driver core: move klist_children into private structure driver core: create a private portion of struct device driver core: remove polling for driver_probe_done(v5) sysfs: reference sysfs_dirent from sysfs inodes ... Fixed conflicts in drivers/sh/maple/maple.c manually
Diffstat (limited to 'drivers/pcmcia/m32r_cfc.c')
-rw-r--r--drivers/pcmcia/m32r_cfc.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/drivers/pcmcia/m32r_cfc.c b/drivers/pcmcia/m32r_cfc.c
index 2ab4f22c21de..62b4ecc97c46 100644
--- a/drivers/pcmcia/m32r_cfc.c
+++ b/drivers/pcmcia/m32r_cfc.c
@@ -696,13 +696,25 @@ static struct pccard_operations pcc_operations = {
696 .set_mem_map = pcc_set_mem_map, 696 .set_mem_map = pcc_set_mem_map,
697}; 697};
698 698
699static int cfc_drv_pcmcia_suspend(struct platform_device *dev,
700 pm_message_t state)
701{
702 return pcmcia_socket_dev_suspend(&dev->dev, state);
703}
704
705static int cfc_drv_pcmcia_resume(struct platform_device *dev)
706{
707 return pcmcia_socket_dev_resume(&dev->dev);
708}
699/*====================================================================*/ 709/*====================================================================*/
700 710
701static struct device_driver pcc_driver = { 711static struct platform_driver pcc_driver = {
702 .name = "cfc", 712 .driver = {
703 .bus = &platform_bus_type, 713 .name = "cfc",
704 .suspend = pcmcia_socket_dev_suspend, 714 .owner = THIS_MODULE,
705 .resume = pcmcia_socket_dev_resume, 715 },
716 .suspend = cfc_drv_pcmcia_suspend,
717 .resume = cfc_drv_pcmcia_resume,
706}; 718};
707 719
708static struct platform_device pcc_device = { 720static struct platform_device pcc_device = {
@@ -716,13 +728,13 @@ static int __init init_m32r_pcc(void)
716{ 728{
717 int i, ret; 729 int i, ret;
718 730
719 ret = driver_register(&pcc_driver); 731 ret = platform_driver_register(&pcc_driver);
720 if (ret) 732 if (ret)
721 return ret; 733 return ret;
722 734
723 ret = platform_device_register(&pcc_device); 735 ret = platform_device_register(&pcc_device);
724 if (ret){ 736 if (ret){
725 driver_unregister(&pcc_driver); 737 platform_driver_unregister(&pcc_driver);
726 return ret; 738 return ret;
727 } 739 }
728 740
@@ -754,7 +766,7 @@ static int __init init_m32r_pcc(void)
754 if (pcc_sockets == 0) { 766 if (pcc_sockets == 0) {
755 printk("socket is not found.\n"); 767 printk("socket is not found.\n");
756 platform_device_unregister(&pcc_device); 768 platform_device_unregister(&pcc_device);
757 driver_unregister(&pcc_driver); 769 platform_driver_unregister(&pcc_driver);
758 return -ENODEV; 770 return -ENODEV;
759 } 771 }
760 772
@@ -802,7 +814,7 @@ static void __exit exit_m32r_pcc(void)
802 if (poll_interval != 0) 814 if (poll_interval != 0)
803 del_timer_sync(&poll_timer); 815 del_timer_sync(&poll_timer);
804 816
805 driver_unregister(&pcc_driver); 817 platform_driver_unregister(&pcc_driver);
806} /* exit_m32r_pcc */ 818} /* exit_m32r_pcc */
807 819
808module_init(init_m32r_pcc); 820module_init(init_m32r_pcc);