PCI: Use pdev->pm_cap instead of pci_find_capability(..,PCI_CAP_ID_PM)
[deliverable/linux.git] / drivers / pci / quirks.c
index 7f492574dcf450e947bdc10fd42be878f5ac63b0..dee5ed4f7b6e182d0c0294d2928786c36b257b50 100644 (file)
@@ -1832,7 +1832,6 @@ static void quirk_e100_interrupt(struct pci_dev *dev)
        u16 command, pmcsr;
        u8 __iomem *csr;
        u8 cmd_hi;
-       int pm;
 
        switch (dev->device) {
        /* PCI IDs taken from drivers/net/e100.c */
@@ -1870,9 +1869,8 @@ static void quirk_e100_interrupt(struct pci_dev *dev)
         * Check that the device is in the D0 power state. If it's not,
         * there is no point to look any further.
         */
-       pm = pci_find_capability(dev, PCI_CAP_ID_PM);
-       if (pm) {
-               pci_read_config_word(dev, pm + PCI_PM_CTRL, &pmcsr);
+       if (dev->pm_cap) {
+               pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr);
                if ((pmcsr & PCI_PM_CTRL_STATE_MASK) != PCI_D0)
                        return;
        }
This page took 0.026477 seconds and 5 git commands to generate.