lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1340002598.6640.7.camel@linux-s257.site>
Date:	Mon, 18 Jun 2012 14:56:38 +0800
From:	joeyli <jlee@...e.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	platform-driver-x86@...r.kernel.org,
	Henrique de Moraes Holschuh <ibm-acpi@....eng.br>,
	LKML <linux-kernel@...r.kernel.org>,
	Linux PM list <linux-pm@...r.kernel.org>,
	Matthew Garrett <mjg59@...f.ucam.org>,
	Joey Lee <jlee@...ell.com>
Subject: Re: [PATCH 3/5] acer-wmi: Use struct dev_pm_ops for power
 management

於 日,2012-06-17 於 22:28 +0200,Rafael J. Wysocki 提到:
> From: Rafael J. Wysocki <rjw@...k.pl>
> 
> Make the acer-wmi driver define its PM callbacks through
> a struct dev_pm_ops object rather than by using legacy PM hooks
> in struct platform_driver.
> 
> Signed-off-by: Rafael J. Wysocki <rjw@...k.pl>

Patch good to me!

Tested on Acer TravelMate 4750

Tested-by: Lee, Chun-Yi <jlee@...e.com>


Thanks a lot!
Joey Lee

> ---
>  drivers/platform/x86/acer-wmi.c |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> Index: linux/drivers/platform/x86/acer-wmi.c
> ===================================================================
> --- linux.orig/drivers/platform/x86/acer-wmi.c
> +++ linux/drivers/platform/x86/acer-wmi.c
> @@ -1877,8 +1877,7 @@ static int acer_platform_remove(struct p
>  	return 0;
>  }
>  
> -static int acer_platform_suspend(struct platform_device *dev,
> -pm_message_t state)
> +static int acer_suspend(struct device *dev)
>  {
>  	u32 value;
>  	struct acer_data *data = &interface->data;
> @@ -1900,7 +1899,7 @@ pm_message_t state)
>  	return 0;
>  }
>  
> -static int acer_platform_resume(struct platform_device *device)
> +static int acer_resume(struct device *dev)
>  {
>  	struct acer_data *data = &interface->data;
>  
> @@ -1916,6 +1915,8 @@ static int acer_platform_resume(struct p
>  	return 0;
>  }
>  
> +static SIMPLE_DEV_PM_OPS(acer_pm, acer_suspend, acer_resume);
> +
>  static void acer_platform_shutdown(struct platform_device *device)
>  {
>  	struct acer_data *data = &interface->data;
> @@ -1931,11 +1932,10 @@ static struct platform_driver acer_platf
>  	.driver = {
>  		.name = "acer-wmi",
>  		.owner = THIS_MODULE,
> +		.pm = &acer_pm,
>  	},
>  	.probe = acer_platform_probe,
>  	.remove = acer_platform_remove,
> -	.suspend = acer_platform_suspend,
> -	.resume = acer_platform_resume,
>  	.shutdown = acer_platform_shutdown,
>  };
>  
> 
> 


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ