]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/pci/pci.c
PCI ACPI: Drop the second argument of platform_pci_choose_state
[linux-2.6-omap-h63xx.git] / drivers / pci / pci.c
index a4445b7210bf7057e0322c5ba49d943ce1cbd056..75c60239cadd035d967677d60e662b5a23e360fe 100644 (file)
@@ -18,6 +18,7 @@
 #include <linux/spinlock.h>
 #include <linux/string.h>
 #include <linux/log2.h>
+#include <linux/pci-aspm.h>
 #include <asm/dma.h>   /* isa_dma_bridge_buggy */
 #include "pci.h"
 
@@ -424,7 +425,7 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state)
         */
        if (state != PCI_D0 && dev->current_state > state) {
                printk(KERN_ERR "%s(): %s: state=%d, current state=%d\n",
-                       __FUNCTION__, pci_name(dev), state, dev->current_state);
+                       __func__, pci_name(dev), state, dev->current_state);
                return -EINVAL;
        } else if (dev->current_state == state)
                return 0;        /* we're already there */
@@ -501,10 +502,13 @@ pci_set_power_state(struct pci_dev *dev, pci_power_t state)
        if (need_restore)
                pci_restore_bars(dev);
 
+       if (dev->bus->self)
+               pcie_aspm_pm_state_change(dev->bus->self);
+
        return 0;
 }
 
-pci_power_t (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state);
+pci_power_t (*platform_pci_choose_state)(struct pci_dev *dev);
  
 /**
  * pci_choose_state - Choose the power state of a PCI device
@@ -524,7 +528,7 @@ pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state)
                return PCI_D0;
 
        if (platform_pci_choose_state) {
-               ret = platform_pci_choose_state(dev, state);
+               ret = platform_pci_choose_state(dev);
                if (ret != PCI_POWER_ERROR)
                        return ret;
        }