- powermac-force-only-suspend-to-disk-to-be-valid.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     PowerMac: force only suspend-to-disk to be valid

has been removed from the -mm tree.  Its filename is

     powermac-force-only-suspend-to-disk-to-be-valid.patch

This patch was probably dropped from -mm because
it has now been merged into a subsystem tree or
into Linus's tree, or because it was folded into
its parent patch in the -mm tree.

------------------------------------------------------
Subject: PowerMac: force only suspend-to-disk to be valid
From: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>


For a very long time, echoing 'standby' or 'mem' into /sys/power/state has
killed the machine on powerpc.  This patch fixes that.

This patch adds the .valid callback to pm_ops on PowerMac so that only the
suspend to disk state can be entered.  Note that just returning 0 would
suffice since the upper layers don't pass PM_SUSPEND_DISK down, but we
handle it there regardless just in case that changes.

Acked-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
Cc: <stable@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/powerpc/platforms/powermac/setup.c |   12 ++++++++++++
 1 files changed, 12 insertions(+)

diff -puN arch/powerpc/platforms/powermac/setup.c~powermac-force-only-suspend-to-disk-to-be-valid arch/powerpc/platforms/powermac/setup.c
--- devel/arch/powerpc/platforms/powermac/setup.c~powermac-force-only-suspend-to-disk-to-be-valid	2006-05-25 18:44:06.000000000 -0700
+++ devel-akpm/arch/powerpc/platforms/powermac/setup.c	2006-05-25 18:44:06.000000000 -0700
@@ -463,11 +463,23 @@ static int pmac_pm_finish(suspend_state_
 	return 0;
 }
 
+static int pmac_pm_valid(suspend_state_t state)
+{
+	switch (state) {
+	case PM_SUSPEND_DISK:
+		return 1;
+	/* can't do any other states via generic mechanism yet */
+	default:
+		return 0;
+	}
+}
+
 static struct pm_ops pmac_pm_ops = {
 	.pm_disk_mode	= PM_DISK_SHUTDOWN,
 	.prepare	= pmac_pm_prepare,
 	.enter		= pmac_pm_enter,
 	.finish		= pmac_pm_finish,
+	.valid		= pmac_pm_valid,
 };
 
 #endif /* CONFIG_SOFTWARE_SUSPEND */
_

Patches currently in -mm which might be from johannes@xxxxxxxxxxxxxxxx are

origin.patch
via-pmu-add-input-device.patch
via-pmu-add-input-device-tidy.patch
git-netdev-all.patch
apple-motion-sensor-driver.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux