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-next>] [day] [month] [year] [list]
Date:	Thu, 12 Jul 2012 12:29:24 +0200
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Daniel Drake <dsd@...top.org>
Cc:	ACPI Devel Mailing List <linux-acpi@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Linux PM list <linux-pm@...r.kernel.org>,
	Len Brown <lenb@...nel.org>,
	"H. Peter Anvin" <hpa@...ux.intel.com>,
	Randy Dunlap <rdunlap@...otime.net>,
	Stephen Rothwell <sfr@...b.auug.org.au>
Subject: [PATCH] olpc-xo15-sci: Use struct dev_pm_ops for power management

From: Rafael J. Wysocki <rjw@...k.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@...k.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)
--
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