lkml.org 
[lkml]   [2009]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] acerhdf: convert to dev_pm_ops
    On Wed, Jul 15, 2009 at 08:36:43PM +0200, Peter Feuerer wrote:
    > Works fine here, thanks!
    >
    > Acked-by: Peter Feuerer <peter@piie.net>

    Umm, did you test suspend-to-disk? As far as I understand the new
    suspend() and resume() methods are onluy used for S2R and for S2D you need
    to use freeze() and thaw().

    >
    > Borislav Petkov writes:
    >
    >> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
    >> ---
    >> drivers/platform/x86/acerhdf.c | 14 +++++++++-----
    >> 1 files changed, 9 insertions(+), 5 deletions(-)
    >>
    >> diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
    >> index aa298d6..561b471 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,7 +446,7 @@ static int acerhdf_suspend(struct platform_device *dev, pm_message_t state)
    >> return 0;
    >> }
    >> -static int acerhdf_resume(struct platform_device *device)
    >> +static int acerhdf_resume(struct device *dev)
    >> {
    >> if (verbose)
    >> pr_notice("resuming\n");
    >> @@ -464,15 +464,19 @@ static int acerhdf_remove(struct platform_device *device)
    >> return 0;
    >> }
    >> +static struct dev_pm_ops acerhdf_pm_ops = {
    >> + .suspend = acerhdf_suspend,
    >> + .resume = acerhdf_resume,
    >> +};
    >> +
    >> 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,
    >> };
    >>

    --
    Dmitry


    \
     
     \ /
      Last update: 2009-07-23 10:31    [W:2.608 / U:0.588 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site