Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9515930e authored by Kenji Kaneshige's avatar Kenji Kaneshige Committed by Greg Kroah-Hartman
Browse files

PCI Hotplug: pciehp: use generic function to find ext capability



Remove duplicated code to find an extend capability in PCIEHP driver.

Signed-off-by: default avatarKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: default avatarKristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 941f10e9
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -105,12 +105,7 @@ static void program_hpp_type2(struct pci_dev *dev, struct hpp_type2 *hpp)
	}

	/* Find Advanced Error Reporting Enhanced Capability */
	pos = 256;
	do {
		pci_read_config_dword(dev, pos, &reg32);
		if (PCI_EXT_CAP_ID(reg32) == PCI_EXT_CAP_ID_ERR)
			break;
	} while ((pos = PCI_EXT_CAP_NEXT(reg32)));
	pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR);
	if (!pos)
		return;