summaryrefslogtreecommitdiff
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-29 17:25:48 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-29 17:25:48 -0800
commit9ca0e5474d11ca044e0aacfa6e78bf17957118d2 (patch)
tree2ffa4b51a73070e41b53644e0adfd39adf1eb501 /drivers/pcmcia
parentc0f79c4cb11acca545f9802ee0e14ad3b5cc123d (diff)
parent9f0f9313cec8c76c89bc8a68653f928fa12fab96 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] 3914/1: [Jornada7xx] - Typo Fix in cpu-sa1110.c (b != B) [ARM] 3913/1: n2100: fix IRQ routing for second ethernet port [ARM] Add KBUILD_IMAGE target support [ARM] Fix suspend oops caused by PXA2xx PCMCIA driver [ARM] Fix i2c-pxa slave mode support [ARM] 3900/1: Fix VFP Division by Zero exception handling. [ARM] 3899/1: Fix the normalization of the denormal double precision number. [ARM] 3909/1: Disable UWIND_INFO for ARM (again) [ARM] Add __must_check to uaccess functions [ARM] Add realview SMP default configuration [ARM] Fix SMP irqflags support
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/pxa2xx_base.c41
-rw-r--r--drivers/pcmcia/pxa2xx_base.h2
-rw-r--r--drivers/pcmcia/pxa2xx_lubbock.c2
3 files changed, 31 insertions, 14 deletions
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c
index b3518131ea0d..dca9f8549b32 100644
--- a/drivers/pcmcia/pxa2xx_base.c
+++ b/drivers/pcmcia/pxa2xx_base.c
@@ -166,7 +166,7 @@ pxa2xx_pcmcia_frequency_change(struct soc_pcmcia_socket *skt,
}
#endif
-int pxa2xx_drv_pcmcia_probe(struct device *dev)
+int __pxa2xx_drv_pcmcia_probe(struct device *dev)
{
int ret;
struct pcmcia_low_level *ops;
@@ -203,35 +203,52 @@ int pxa2xx_drv_pcmcia_probe(struct device *dev)
return ret;
}
-EXPORT_SYMBOL(pxa2xx_drv_pcmcia_probe);
+EXPORT_SYMBOL(__pxa2xx_drv_pcmcia_probe);
-static int pxa2xx_drv_pcmcia_resume(struct device *dev)
+
+static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev)
+{
+ return __pxa2xx_drv_pcmcia_probe(&dev->dev);
+}
+
+static int pxa2xx_drv_pcmcia_remove(struct platform_device *dev)
+{
+ return soc_common_drv_pcmcia_remove(&dev->dev);
+}
+
+static int pxa2xx_drv_pcmcia_suspend(struct platform_device *dev, pm_message_t state)
+{
+ return pcmcia_socket_dev_suspend(&dev->dev, state);
+}
+
+static int pxa2xx_drv_pcmcia_resume(struct platform_device *dev)
{
- struct pcmcia_low_level *ops = dev->platform_data;
+ struct pcmcia_low_level *ops = dev->dev.platform_data;
int nr = ops ? ops->nr : 0;
MECR = nr > 1 ? MECR_CIT | MECR_NOS : (nr > 0 ? MECR_CIT : 0);
- return pcmcia_socket_dev_resume(dev);
+ return pcmcia_socket_dev_resume(&dev->dev);
}
-static struct device_driver pxa2xx_pcmcia_driver = {
+static struct platform_driver pxa2xx_pcmcia_driver = {
.probe = pxa2xx_drv_pcmcia_probe,
- .remove = soc_common_drv_pcmcia_remove,
- .suspend = pcmcia_socket_dev_suspend,
+ .remove = pxa2xx_drv_pcmcia_remove,
+ .suspend = pxa2xx_drv_pcmcia_suspend,
.resume = pxa2xx_drv_pcmcia_resume,
- .name = "pxa2xx-pcmcia",
- .bus = &platform_bus_type,
+ .driver = {
+ .name = "pxa2xx-pcmcia",
+ },
};
static int __init pxa2xx_pcmcia_init(void)
{
- return driver_register(&pxa2xx_pcmcia_driver);
+ return platform_driver_register(&pxa2xx_pcmcia_driver);
}
static void __exit pxa2xx_pcmcia_exit(void)
{
- driver_unregister(&pxa2xx_pcmcia_driver);
+ platform_driver_unregister(&pxa2xx_pcmcia_driver);
}
fs_initcall(pxa2xx_pcmcia_init);
diff --git a/drivers/pcmcia/pxa2xx_base.h b/drivers/pcmcia/pxa2xx_base.h
index e46cff345d47..235d681652c3 100644
--- a/drivers/pcmcia/pxa2xx_base.h
+++ b/drivers/pcmcia/pxa2xx_base.h
@@ -1,3 +1,3 @@
/* temporary measure */
-extern int pxa2xx_drv_pcmcia_probe(struct device *);
+extern int __pxa2xx_drv_pcmcia_probe(struct device *);
diff --git a/drivers/pcmcia/pxa2xx_lubbock.c b/drivers/pcmcia/pxa2xx_lubbock.c
index fd1f691c7c2c..a92f11143c43 100644
--- a/drivers/pcmcia/pxa2xx_lubbock.c
+++ b/drivers/pcmcia/pxa2xx_lubbock.c
@@ -260,7 +260,7 @@ int __init pcmcia_lubbock_init(struct sa1111_dev *sadev)
lubbock_set_misc_wr((1 << 15) | (1 << 14), 0);
sadev->dev.platform_data = &lubbock_pcmcia_ops;
- ret = pxa2xx_drv_pcmcia_probe(&sadev->dev);
+ ret = __pxa2xx_drv_pcmcia_probe(&sadev->dev);
}
return ret;