/* pci_update_current_state - Read PCI power state of given device from its PCI PM registers and cache it @dev: PCI device to handle. @state: State to cache in case the device doesn't have the PM capability  */
void pci_update_current_state(struct pci_dev *dev, pci_power_t state)
/* pci_update_current_state - Read PCI power state of given device from its PCI PM registers and cache it @dev: PCI device to handle. @state: State to cache in case the device doesn't have the PM capability  */
void pci_update_current_state(struct pci_dev *dev, pci_power_t state)
{
	if (dev->pm_cap) {
		u16 pmcsr;
		pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pmcsr);
		dev->current_state = (pmcsr & PCI_PM_CTRL_STATE_MASK);
	} else {
		dev->current_state = state;
	}
}