Skip to contentSkip to conversation

acerhdf: convert to dev_pm_ops

PATCH In review Peter Feuerer 2 participants 4 messages Aug 13, 2009

Subsystems (2)
lore
Share & tools
lore

Peter Feuerer

author maintainer
#0 lore raw

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.

---
 drivers/platform/x86/acerhdf.c |   22 +++++++++-------------
 1 files changed, 9 insertions(+), 13 deletions(-)
drivers/platform/x86/acerhdf.c +9 -13
index aa298d6..8ff5639 100644
@@ -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,
 };
 
 
Signature · 6 lines
1.6.4



-- 
Peter Feuerer <[email protected]>
author maintainer
#1 lore raw

Re: [PATCH 2/2] acerhdf: additional BIOS versions

Added BIOS versions:
Acer: AOA110-v0.3307, AOA150-v0.3301, AOA150-v0.3307 Pckard Bell: AOA150-v0.3105

Cc Andreas Mohr <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Len Brown <[email protected]>
---
 drivers/platform/x86/acerhdf.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/platform/x86/acerhdf.c +4 -0
index 8ff5639..e0d4f0b 100644
@@ -139,13 +139,16 @@ static const struct bios_settings_t bios_tbl[] = {
 	{"Acer", "AOA110", "v0.3301", 0x55, 0x58, {0xaf, 0x00} },
 	{"Acer", "AOA110", "v0.3304", 0x55, 0x58, {0xaf, 0x00} },
 	{"Acer", "AOA110", "v0.3305", 0x55, 0x58, {0xaf, 0x00} },
+	{"Acer", "AOA110", "v0.3307", 0x55, 0x58, {0xaf, 0x00} },
 	{"Acer", "AOA110", "v0.3308", 0x55, 0x58, {0x21, 0x00} },
 	{"Acer", "AOA110", "v0.3309", 0x55, 0x58, {0x21, 0x00} },
 	{"Acer", "AOA110", "v0.3310", 0x55, 0x58, {0x21, 0x00} },
 	/* AOA150 */
 	{"Acer", "AOA150", "v0.3114", 0x55, 0x58, {0x20, 0x00} },
+	{"Acer", "AOA150", "v0.3301", 0x55, 0x58, {0x20, 0x00} },
 	{"Acer", "AOA150", "v0.3304", 0x55, 0x58, {0x20, 0x00} },
 	{"Acer", "AOA150", "v0.3305", 0x55, 0x58, {0x20, 0x00} },
+	{"Acer", "AOA150", "v0.3307", 0x55, 0x58, {0x20, 0x00} },
 	{"Acer", "AOA150", "v0.3308", 0x55, 0x58, {0x20, 0x00} },
 	{"Acer", "AOA150", "v0.3309", 0x55, 0x58, {0x20, 0x00} },
 	{"Acer", "AOA150", "v0.3310", 0x55, 0x58, {0x20, 0x00} },
@@ -154,6 +157,7 @@ static const struct bios_settings_t bios_tbl[] = {
 	{"Gateway", "AOA150", "v0.3103", 0x55, 0x58, {0x20, 0x00} },
 	{"Packard Bell", "DOA150", "v0.3104", 0x55, 0x58, {0x21, 0x00} },
 	{"Packard Bell", "AOA110", "v0.3105", 0x55, 0x58, {0x21, 0x00} },
+	{"Packard Bell", "AOA150", "v0.3105", 0x55, 0x58, {0x20, 0x00} },
 	/* pewpew-terminator */
 	{"", "", "", 0, 0, {0, 0} }
 };
Signature · 5 lines
1.6.4


-- 
Peter Feuerer <[email protected]>
#2 lore raw
In reply to Peter Feuerer
Quoted 10 lines · On Thu, 13 Aug 2009 12:17:22 +0200 Peter Feuerer <[email protected]> wrote:

acerhdf: convert to dev_pm_ops

v 1.1:
Add .freeze func ptr to support suspend-to-disk, as suggested by Dmitry Torokhov.

I believe that Boris wrote this, yes?

The way this patch/email was presented implies that you were the primary author.

Please use an explicit From: line right at the top of the changelog (after all the mail headers) to explicitly identify the primary author.

I added a

From: Borislav Petkov <[email protected]>

to my copy of this patch. Please let me kow if that was incorrect.

author maintainer
#3 lore raw
Quoted 9 lines · Andrew Morton
Quoted 6 lines · On Thu, 13 Aug 2009 12:17:22 +0200 Peter Feuerer <[email protected]> wrote:

acerhdf: convert to dev_pm_ops

v 1.1:
Add .freeze func ptr to support suspend-to-disk, as suggested by Dmitry Torokhov.

Quoted 6 lines
Quoted 4 lines

I believe that Boris wrote this, yes?

Yes, Boris wrote the patch.

Quoted 4 lines

The way this patch/email was presented implies that you were the primary author.

Quoted 8 lines

Please use an explicit From: line right at the top of the changelog (after all the mail headers) to explicitly identify the primary author.

I added a

From: Borislav Petkov <[email protected]>

to my copy of this patch. Please let me kow if that was incorrect.

Thank you very much for adding this line. And thanks for teaching,.. yet another thing I've learned from you :)

--peter