[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090813121722.48988dfc.peter@piie.net>
Date: Thu, 13 Aug 2009 12:17:22 +0200
From: Peter Feuerer <peter@...e.net>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org,
Borislav Petkov <petkovbb@...glemail.com>, lenb@...nel.org,
Andreas Mohr <andi@...as.de>, Peter Feuerer <peter@...e.net>
Subject: [PATCH 1/2] acerhdf: convert to dev_pm_ops
acerhdf: convert to dev_pm_ops
v 1.1:
Add .freeze func ptr to support suspend-to-disk,
as suggested by Dmitry Torokhov.
Signed-off-by: Borislav Petkov <petkovbb@...il.com>
Signed-off-by: Peter Feuerer <peter@...e.net>
Cc: Andreas Mohr <andi@...as.de>
Cc: Len Brown <lenb@...nel.org>
---
drivers/platform/x86/acerhdf.c | 22 +++++++++-------------
1 files changed, 9 insertions(+), 13 deletions(-)
diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
index aa298d6..8ff5639 100644
--- a/drivers/platform/x86/acerhdf.c
+++ b/drivers/platform/x86/acerhdf.c
@@ -52,7 +52,7 @@
*/
#undef START_IN_KERNEL_MODE
-#define DRV_VER "0.5.16"
+#define DRV_VER "0.5.17"
/*
* According to the Atom N270 datasheet,
@@ -435,7 +435,7 @@ struct thermal_cooling_device_ops acerhdf_cooling_ops = {
};
/* suspend / resume functionality */
-static int acerhdf_suspend(struct platform_device *dev, pm_message_t state)
+static int acerhdf_suspend(struct device *dev)
{
if (kernelmode)
acerhdf_change_fanstate(ACERHDF_FAN_AUTO);
@@ -446,14 +446,6 @@ static int acerhdf_suspend(struct platform_device *dev, pm_message_t state)
return 0;
}
-static int acerhdf_resume(struct platform_device *device)
-{
- if (verbose)
- pr_notice("resuming\n");
-
- return 0;
-}
-
static int __devinit acerhdf_probe(struct platform_device *device)
{
return 0;
@@ -464,15 +456,19 @@ static int acerhdf_remove(struct platform_device *device)
return 0;
}
+static struct dev_pm_ops acerhdf_pm_ops = {
+ .suspend = acerhdf_suspend,
+ .freeze = acerhdf_suspend,
+};
+
static struct platform_driver acerhdf_driver = {
.driver = {
- .name = "acerhdf",
+ .name = "acerhdf",
.owner = THIS_MODULE,
+ .pm = &acerhdf_pm_ops,
},
.probe = acerhdf_probe,
.remove = acerhdf_remove,
- .suspend = acerhdf_suspend,
- .resume = acerhdf_resume,
};
--
1.6.4
--
Peter Feuerer <peter@...e.net>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists