newfunc->pci_dev = pci_find_slot(bridge->bus, 
newfunc->pci_dev = pci_get_slot(bridge->pci_bus, 
register_slot(acpi_handle handle, u32 lvl, void *context, void **rv){	struct acpiphp_bridge *bridge = (struct acpiphp_bridge *)context;	struct acpiphp_slot *slot;	struct acpiphp_func *newfunc;	acpi_handle tmp;	acpi_status status = AE_OK;	unsigned long adr, sun;	int device, function;	static int num_slots = 0;	/* XXX if we support I/O node hotplug... */	status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr);	if (ACPI_FAILURE(status))		return AE_OK;	status = acpi_get_handle(handle, "_EJ0", &tmp);	if (ACPI_FAILURE(status))		return AE_OK;	device = (adr >> 16) & 0xffff;	function = adr & 0xffff;	newfunc = kmalloc(sizeof(struct acpiphp_func), GFP_KERNEL);	if (!newfunc)		return AE_NO_MEMORY;	memset(newfunc, 0, sizeof(struct acpiphp_func));	INIT_LIST_HEAD(&newfunc->sibling);	newfunc->handle = handle;	newfunc->function = function;	newfunc->flags = FUNC_HAS_EJ0;	if (ACPI_SUCCESS(acpi_get_handle(handle, "_STA", &tmp)))		newfunc->flags |= FUNC_HAS_STA;	if (ACPI_SUCCESS(acpi_get_handle(handle, "_PS0", &tmp)))		newfunc->flags |= FUNC_HAS_PS0;	if (ACPI_SUCCESS(acpi_get_handle(handle, "_PS3", &tmp)))		newfunc->flags |= FUNC_HAS_PS3;	status = acpi_evaluate_integer(handle, "_SUN", NULL, &sun);	if (ACPI_FAILURE(status))		sun = -1;	/* search for objects that share the same slot */	for (slot = bridge->slots; slot; slot = slot->next)		if (slot->device == device) {			if (slot->sun != sun)				warn("sibling found, but _SUN doesn't match!\n");			break;		}	if (!slot) {		slot = kmalloc(sizeof(struct acpiphp_slot), GFP_KERNEL);		if (!slot) {			kfree(newfunc);			return AE_NO_MEMORY;		}		memset(slot, 0, sizeof(struct acpiphp_slot));		slot->bridge = bridge;		slot->id = num_slots++;		slot->device = device;		slot->sun = sun;		INIT_LIST_HEAD(&slot->funcs);		init_MUTEX(&slot->crit_sect);		slot->next = bridge->slots;		bridge->slots = slot;		bridge->nr_slots++;		dbg("found ACPI PCI Hotplug slot at PCI %02x:%02x Slot:%d\n",		    slot->bridge->bus, slot->device, slot->sun);	}	newfunc->slot = slot;	list_add_tail(&newfunc->sibling, &slot->funcs);	/* associate corresponding pci_dev */	newfunc->pci_dev = pci_find_slot(bridge->bus,					 PCI_DEVFN(device, function));	if (newfunc->pci_dev) {		if (acpiphp_init_func_resource(newfunc) < 0) {			kfree(newfunc);			return AE_ERROR;		}		slot->flags |= (SLOT_ENABLED | SLOT_POWEREDON);	}	/* install notify handler */	status = acpi_install_notify_handler(handle,					     ACPI_SYSTEM_NOTIFY,					     handle_hotplug_event_func,					     newfunc);	if (ACPI_FAILURE(status)) {		err("failed to register interrupt notify handler\n");		return status;	}	return AE_OK;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/42f49a6ae5dca90cd0594475502bf1c43ff1dc07/acpiphp_glue.c/clean/drivers/pci/hotplug/acpiphp_glue.c