linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Daniel Drake <dsd@laptop.org>,
	ACPI Devel Mailing List <linux-acpi@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux PM list <linux-pm@vger.kernel.org>,
	Len Brown <lenb@kernel.org>,
	"H. Peter Anvin" <hpa@linux.intel.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH] olpc-xo15-sci: Use struct dev_pm_ops for power management
Date: Thu, 12 Jul 2012 08:51:20 -0700	[thread overview]
Message-ID: <4FFEF278.8010700@xenotime.net> (raw)
In-Reply-To: <201207121229.24872.rjw@sisk.pl>

On 07/12/2012 03:29 AM, Rafael J. Wysocki wrote:

> From: Rafael J. Wysocki <rjw@sisk.pl>
> 
> Make the OLPC XO15 SCI driver define its resume callback through
> a struct dev_pm_ops object rather than by using a legacy PM hook
> in struct acpi_device_ops.
> 
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>


Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>

Thanks.


> ---
> 
> This patch was missing from my patchset converting ACPI do the PM handling
> based on struct dev_pm_ops.
> 
> If there are no objections, I'll add it to the pm-acpi branch of the
> linux-pm.git tree so that it goes in along with the other changes in that
> area.
> 
> Thanks,
> Rafael
> 
> ---
>  arch/x86/platform/olpc/olpc-xo15-sci.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> Index: linux/arch/x86/platform/olpc/olpc-xo15-sci.c
> ===================================================================
> --- linux.orig/arch/x86/platform/olpc/olpc-xo15-sci.c
> +++ linux/arch/x86/platform/olpc/olpc-xo15-sci.c
> @@ -203,7 +203,7 @@ static int xo15_sci_remove(struct acpi_d
>  	return 0;
>  }
>  
> -static int xo15_sci_resume(struct acpi_device *device)
> +static int xo15_sci_resume(struct device *dev)
>  {
>  	/* Enable all EC events */
>  	olpc_ec_mask_write(EC_SCI_SRC_ALL);
> @@ -215,6 +215,8 @@ static int xo15_sci_resume(struct acpi_d
>  	return 0;
>  }
>  
> +static SIMPLE_DEV_PM_OPS(xo15_sci_pm, NULL, xo15_sci_resume);
> +
>  static const struct acpi_device_id xo15_sci_device_ids[] = {
>  	{"XO15EC", 0},
>  	{"", 0},
> @@ -227,8 +229,8 @@ static struct acpi_driver xo15_sci_drv =
>  	.ops = {
>  		.add = xo15_sci_add,
>  		.remove = xo15_sci_remove,
> -		.resume = xo15_sci_resume,
>  	},
> +	.drv.pm = &xo15_sci_pm,
>  };
>  
>  static int __init xo15_sci_init(void)



-- 
~Randy

      reply	other threads:[~2012-07-12 15:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12 10:29 [PATCH] olpc-xo15-sci: Use struct dev_pm_ops for power management Rafael J. Wysocki
2012-07-12 15:51 ` Randy Dunlap [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=4FFEF278.8010700@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=dsd@laptop.org \
    --cc=hpa@linux.intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=sfr@canb.auug.org.au \
    /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;
as well as URLs for NNTP newsgroup(s).