aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/pci-acpi.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index a0d43ea872df..e9e37abe1f76 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * File: pci-acpi.c 2 * File: pci-acpi.c
3 * Purpose: Provde PCI support in ACPI 3 * Purpose: Provide PCI support in ACPI
4 * 4 *
5 * Copyright (C) 2005 David Shaohua Li <shaohua.li@intel.com> 5 * Copyright (C) 2005 David Shaohua Li <shaohua.li@intel.com>
6 * Copyright (C) 2004 Tom Long Nguyen <tom.l.nguyen@intel.com> 6 * Copyright (C) 2004 Tom Long Nguyen <tom.l.nguyen@intel.com>
@@ -237,19 +237,8 @@ EXPORT_SYMBOL(pci_osc_control_set);
237 237
238static int acpi_pci_choose_state(struct pci_dev *pdev, pm_message_t state) 238static int acpi_pci_choose_state(struct pci_dev *pdev, pm_message_t state)
239{ 239{
240 char dstate_str[] = "_S0D"; 240 /* TBD */
241 acpi_status status;
242 unsigned long val;
243 struct device *dev = &pdev->dev;
244 241
245 /* Fixme: the check is wrong after pm_message_t is a struct */
246 if ((state >= PM_SUSPEND_MAX) || !DEVICE_ACPI_HANDLE(dev))
247 return -EINVAL;
248 dstate_str[2] += state; /* _S1D, _S2D, _S3D, _S4D */
249 status = acpi_evaluate_integer(DEVICE_ACPI_HANDLE(dev), dstate_str,
250 NULL, &val);
251 if (ACPI_SUCCESS(status))
252 return val;
253 return -ENODEV; 242 return -ENODEV;
254} 243}
255 244