PCI: correctly initialize a structure for pcie_save_pcix_state()

save_state->cap_nr should be correctly set, otherwise we can't find the
saved cap at resume.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Shaohua Li and committed by
Greg Kroah-Hartman
ec0a3a27 f34303de

+2
+2
drivers/pci/pci.c
··· 587 587 pci_read_config_word(dev, pos + PCI_EXP_LNKCTL, &cap[i++]); 588 588 pci_read_config_word(dev, pos + PCI_EXP_SLTCTL, &cap[i++]); 589 589 pci_read_config_word(dev, pos + PCI_EXP_RTCTL, &cap[i++]); 590 + save_state->cap_nr = PCI_CAP_ID_EXP; 590 591 pci_add_saved_cap(dev, save_state); 591 592 return 0; 592 593 } ··· 631 630 cap = (u16 *)&save_state->data[0]; 632 631 633 632 pci_read_config_word(dev, pos + PCI_X_CMD, &cap[i++]); 633 + save_state->cap_nr = PCI_CAP_ID_PCIX; 634 634 pci_add_saved_cap(dev, save_state); 635 635 return 0; 636 636 }