git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ARM: sa1111: fix pcmcia suspend/resume
[pandora-kernel.git]
/
arch
/
arm
/
common
/
sa1111.c
diff --git
a/arch/arm/common/sa1111.c
b/arch/arm/common/sa1111.c
index
61691cd
..
cab1725
100644
(file)
--- a/
arch/arm/common/sa1111.c
+++ b/
arch/arm/common/sa1111.c
@@
-878,9
+878,9
@@
struct sa1111_save_data {
#ifdef CONFIG_PM
#ifdef CONFIG_PM
-static int sa1111_suspend
(struct platform_device *dev, pm_message_t state
)
+static int sa1111_suspend
_noirq(struct device *dev
)
{
{
- struct sa1111 *sachip =
platform
_get_drvdata(dev);
+ struct sa1111 *sachip =
dev
_get_drvdata(dev);
struct sa1111_save_data *save;
unsigned long flags;
unsigned int val;
struct sa1111_save_data *save;
unsigned long flags;
unsigned int val;
@@
-938,9
+938,9
@@
static int sa1111_suspend(struct platform_device *dev, pm_message_t state)
* restored by their respective drivers, and must be called
* via LDM after this function.
*/
* restored by their respective drivers, and must be called
* via LDM after this function.
*/
-static int sa1111_resume
(struct platform_
device *dev)
+static int sa1111_resume
_noirq(struct
device *dev)
{
{
- struct sa1111 *sachip =
platform
_get_drvdata(dev);
+ struct sa1111 *sachip =
dev
_get_drvdata(dev);
struct sa1111_save_data *save;
unsigned long flags, id;
void __iomem *base;
struct sa1111_save_data *save;
unsigned long flags, id;
void __iomem *base;
@@
-956,7
+956,7
@@
static int sa1111_resume(struct platform_device *dev)
id = sa1111_readl(sachip->base + SA1111_SKID);
if ((id & SKID_ID_MASK) != SKID_SA1111_ID) {
__sa1111_remove(sachip);
id = sa1111_readl(sachip->base + SA1111_SKID);
if ((id & SKID_ID_MASK) != SKID_SA1111_ID) {
__sa1111_remove(sachip);
-
platform
_set_drvdata(dev, NULL);
+
dev
_set_drvdata(dev, NULL);
kfree(save);
return 0;
}
kfree(save);
return 0;
}
@@
-1002,8
+1002,8
@@
static int sa1111_resume(struct platform_device *dev)
}
#else
}
#else
-#define sa1111_suspend NULL
-#define sa1111_resume NULL
+#define sa1111_suspend
_noirq
NULL
+#define sa1111_resume
_noirq
NULL
#endif
static int __devinit sa1111_probe(struct platform_device *pdev)
#endif
static int __devinit sa1111_probe(struct platform_device *pdev)
@@
-1037,6
+1037,11
@@
static int sa1111_remove(struct platform_device *pdev)
return 0;
}
return 0;
}
+static struct dev_pm_ops sa1111_pm_ops = {
+ .suspend_noirq = sa1111_suspend_noirq,
+ .resume_noirq = sa1111_resume_noirq,
+};
+
/*
* Not sure if this should be on the system bus or not yet.
* We really want some way to register a system device at
/*
* Not sure if this should be on the system bus or not yet.
* We really want some way to register a system device at
@@
-1049,10
+1054,9
@@
static int sa1111_remove(struct platform_device *pdev)
static struct platform_driver sa1111_device_driver = {
.probe = sa1111_probe,
.remove = sa1111_remove,
static struct platform_driver sa1111_device_driver = {
.probe = sa1111_probe,
.remove = sa1111_remove,
- .suspend = sa1111_suspend,
- .resume = sa1111_resume,
.driver = {
.name = "sa1111",
.driver = {
.name = "sa1111",
+ .pm = &sa1111_pm_ops,
},
};
},
};