mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <petkovbb@googlemail.com>
To: Peter Feuerer <peter@piie.net>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	lenb@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] acerhdf: convert to dev_pm_ops
Date: Wed, 29 Jul 2009 13:55:51 +0200	[thread overview]
Message-ID: <9ea470500907290455i75971e96y187f7c441274ff74@mail.gmail.com> (raw)
In-Reply-To: <cone.1248852351.306728.15136.1000@arca>

Hi,

On Wed, Jul 29, 2009 at 9:25 AM, Peter Feuerer<peter@piie.net> wrote:
> Ok, I think you are right. So we will remove the resume functionality and
> keep just the suspend + freeze calls?

Yep, see below.

> Btw, should I resend the 0.5.13 → 0.5.16 patch splitted up, so that Len can
> apply them?

No need for that - just add my S-O-B to it and make sure all changes are
properly documented in the commit message.

Thanks.

--
From: Borislav Petkov <petkovbb@gmail.com>
Date: Wed, 15 Jul 2009 17:33:32 +0200
Subject: [PATCH] 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@gmail.com>
---
 drivers/platform/x86/acerhdf.c |   20 ++++++++------------
 1 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
index aa298d6..97e473c 100644
--- a/drivers/platform/x86/acerhdf.c
+++ b/drivers/platform/x86/acerhdf.c
@@ -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.3.3


-- 
Regards/Gruss,
Boris

      reply	other threads:[~2009-07-29 11:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-15 15:48 Borislav Petkov
2009-07-15 18:36 ` Peter Feuerer
2009-07-23  8:29   ` Dmitry Torokhov
2009-07-23  8:52     ` Peter Feuerer
2009-07-23  9:21       ` Borislav Petkov
2009-07-23 12:53         ` Borislav Petkov
2009-07-27  9:07           ` Peter Feuerer
2009-07-27 15:55           ` Dmitry Torokhov
2009-07-27 18:37             ` Borislav Petkov
2009-07-28  7:25               ` Peter Feuerer
2009-07-28  9:08                 ` Borislav Petkov
2009-07-28 13:25                   ` Peter Feuerer
2009-07-28 13:59                     ` Borislav Petkov
2009-07-29  7:25                       ` Peter Feuerer
2009-07-29 11:55                         ` Borislav Petkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9ea470500907290455i75971e96y187f7c441274ff74@mail.gmail.com \
    --to=petkovbb@googlemail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter@piie.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®