aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/tcic.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 11:17:04 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 11:17:04 -0700
commit0c93ea4064a209cdc36de8a9a3003d43d08f46f7 (patch)
treeff19952407c523a1349ef56c05993416dd28437e /drivers/pcmcia/tcic.c
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 (diff)
parentDynamic debug: fix pr_fmt() build error (diff)
downloadlinux-dev-0c93ea4064a209cdc36de8a9a3003d43d08f46f7.tar.xz
linux-dev-0c93ea4064a209cdc36de8a9a3003d43d08f46f7.zip
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/tcic.c')
-rw-r--r--drivers/pcmcia/tcic.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/drivers/pcmcia/tcic.c b/drivers/pcmcia/tcic.c
index 2a613e920fd4..9ad97ea836e8 100644
--- a/drivers/pcmcia/tcic.c
+++ b/drivers/pcmcia/tcic.c
@@ -363,13 +363,25 @@ static int __init get_tcic_id(void)
return id;
}
+static int tcic_drv_pcmcia_suspend(struct platform_device *dev,
+ pm_message_t state)
+{
+ return pcmcia_socket_dev_suspend(&dev->dev, state);
+}
+
+static int tcic_drv_pcmcia_resume(struct platform_device *dev)
+{
+ return pcmcia_socket_dev_resume(&dev->dev);
+}
/*====================================================================*/
-static struct device_driver tcic_driver = {
- .name = "tcic-pcmcia",
- .bus = &platform_bus_type,
- .suspend = pcmcia_socket_dev_suspend,
- .resume = pcmcia_socket_dev_resume,
+static struct platform_driver tcic_driver = {
+ .driver = {
+ .name = "tcic-pcmcia",
+ .owner = THIS_MODULE,
+ },
+ .suspend = tcic_drv_pcmcia_suspend,
+ .resume = tcic_drv_pcmcia_resume,
};
static struct platform_device tcic_device = {
@@ -383,7 +395,7 @@ static int __init init_tcic(void)
int i, sock, ret = 0;
u_int mask, scan;
- if (driver_register(&tcic_driver))
+ if (platform_driver_register(&tcic_driver))
return -1;
printk(KERN_INFO "Databook TCIC-2 PCMCIA probe: ");
@@ -391,7 +403,7 @@ static int __init init_tcic(void)
if (!request_region(tcic_base, 16, "tcic-2")) {
printk("could not allocate ports,\n ");
- driver_unregister(&tcic_driver);
+ platform_driver_unregister(&tcic_driver);
return -ENODEV;
}
else {
@@ -414,7 +426,7 @@ static int __init init_tcic(void)
if (sock == 0) {
printk("not found.\n");
release_region(tcic_base, 16);
- driver_unregister(&tcic_driver);
+ platform_driver_unregister(&tcic_driver);
return -ENODEV;
}
@@ -542,7 +554,7 @@ static void __exit exit_tcic(void)
}
platform_device_unregister(&tcic_device);
- driver_unregister(&tcic_driver);
+ platform_driver_unregister(&tcic_driver);
} /* exit_tcic */
/*====================================================================*/