fix buglet(?) in runtime_pm_fixups.patch

This commit is contained in:
Kyle McMartin 2011-01-24 13:55:48 -05:00
parent f5ea23d7bc
commit 641f5c96f6
2 changed files with 18 additions and 7 deletions

View File

@ -1955,7 +1955,9 @@ fi
%changelog
* Mon Jan 24 2011 Kyle McMartin <kmcmartin@redhat.com>
- debug-tty-print-dev-name.patch: drop, haven't seen any warnings recently.
- runtime_pm_fixups.patch: rebase and re-enable.
- runtime_pm_fixups.patch: rebase and re-enable, make acpi_power_transition
in pci_bind actually do the right thing instead of (likely) always
trying to transition to D0.
* Mon Jan 24 2011 Kyle McMartin <kmcmartin@redhat.com> 2.6.38-0.rc2.git1.1
- Linux 2.6.38-rc2-git1

View File

@ -1,17 +1,17 @@
From f2002684433f9486c5bafcb5967aade367b06b73 Mon Sep 17 00:00:00 2001
From 141d0d01ab292d4ea3a6d5e96b4048e10e68c1d3 Mon Sep 17 00:00:00 2001
From: Kyle McMartin <kyle@mcmartin.ca>
Date: Mon, 24 Jan 2011 13:01:57 -0500
Subject: [PATCH] runtime_pm_fixups
---
drivers/acpi/bus.c | 3 ++-
drivers/acpi/pci_bind.c | 4 ++++
drivers/acpi/pci_bind.c | 6 ++++++
drivers/acpi/power.c | 5 ++++-
drivers/acpi/sleep.c | 2 +-
drivers/acpi/wakeup.c | 2 +-
drivers/pci/pci-acpi.c | 2 +-
include/acpi/acpi_bus.h | 2 +-
7 files changed, 14 insertions(+), 6 deletions(-)
7 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 7ced61f..e4e0114 100644
@ -28,7 +28,7 @@ index 7ced61f..e4e0114 100644
if (result)
goto end;
diff --git a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c
index 2ef0409..395a184 100644
index 2ef0409..4b0bb68 100644
--- a/drivers/acpi/pci_bind.c
+++ b/drivers/acpi/pci_bind.c
@@ -32,6 +32,8 @@
@ -40,11 +40,20 @@ index 2ef0409..395a184 100644
#define _COMPONENT ACPI_PCI_COMPONENT
ACPI_MODULE_NAME("pci_bind");
@@ -87,6 +89,8 @@ static int acpi_pci_bind(struct acpi_device *device)
@@ -65,6 +67,7 @@ static int acpi_pci_bind(struct acpi_device *device)
acpi_handle handle;
struct pci_bus *bus;
struct pci_dev *dev;
+ int state;
dev = acpi_get_pci_dev(device->handle);
if (!dev)
@@ -87,6 +90,9 @@ static int acpi_pci_bind(struct acpi_device *device)
device->ops.unbind = acpi_pci_unbind;
}
+ acpi_power_transition(device, acpi_power_get_inferred_state(device));
+ acpi_power_get_inferred_state(device, &state);
+ acpi_power_transition(device, state);
+
/*
* Evaluate and parse _PRT, if exists. This code allows parsing of