From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Daniel Drake <dsd@laptop.org>
Cc: 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>,
Randy Dunlap <rdunlap@xenotime.net>,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: [PATCH] olpc-xo15-sci: Use struct dev_pm_ops for power management
Date: Thu, 12 Jul 2012 12:29:24 +0200 [thread overview]
Message-ID: <201207121229.24872.rjw@sisk.pl> (raw)
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>
---
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)
next reply other threads:[~2012-07-12 10:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-12 10:29 Rafael J. Wysocki [this message]
2012-07-12 15:51 ` [PATCH] olpc-xo15-sci: Use struct dev_pm_ops for power management Randy Dunlap
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=201207121229.24872.rjw@sisk.pl \
--to=rjw@sisk.pl \
--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=rdunlap@xenotime.net \
--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).