/* Returns pointer to the node if successful, NULL otherwise.  */
struct pci_func* cpqhp_slot_find(u8 bus, u8 device, u8 index)
/* Returns pointer to the node if successful, NULL otherwise.  */
struct pci_func* cpqhp_slot_find(u8 bus, u8 device, u8 index)
{
	int found = -1;
	struct pci_func *func;
	func = cpqhp_slot_list[bus];
	if ((func == NULL) || ((func->device == device) && (index == 0)))
		return func;
	if (func->device == device)
		found++;
	while (func->next != NULL) {
		func = func->next;
		if (func->device == device)
			found++;
		if (found == index)
			return func;
	}
	return NULL;
}