int num; 
int num, max, pass; 
static int enable_device(struct acpiphp_slot *slot){	u8 bus;	struct pci_dev *dev;	struct pci_bus *child;	struct list_head *l;	struct acpiphp_func *func;	int retval = 0;	int num;	if (slot->flags & SLOT_ENABLED)		goto err_exit;	/* sanity check: dev should be NULL when hot-plugged in */	dev = pci_find_slot(slot->bridge->bus, PCI_DEVFN(slot->device, 0));	if (dev) {		/* This case shouldn't happen */		err("pci_dev structure already exists.\n");		retval = -1;		goto err_exit;	}	/* allocate resources to device */	retval = acpiphp_configure_slot(slot);	if (retval)		goto err_exit;	/* returned `dev' is the *first function* only! */	num = pci_scan_slot(slot->bridge->pci_bus, PCI_DEVFN(slot->device, 0));	if (num)		pci_bus_add_devices(slot->bridge->pci_bus);	dev = pci_find_slot(slot->bridge->bus, PCI_DEVFN(slot->device, 0));	if (!dev) {		err("No new device found\n");		retval = -1;		goto err_exit;	}	if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {		pci_read_config_byte(dev, PCI_SECONDARY_BUS, &bus);		child = (struct pci_bus*) pci_add_new_bus(dev->bus, dev, bus);		pci_do_scan_bus(child);	}	/* associate pci_dev to our representation */	list_for_each (l, &slot->funcs) {		func = list_entry(l, struct acpiphp_func, sibling);		func->pci_dev = pci_find_slot(slot->bridge->bus,					      PCI_DEVFN(slot->device,							func->function));		if (!func->pci_dev)			continue;		/* configure device */		retval = acpiphp_configure_function(func);		if (retval)			goto err_exit;	}	slot->flags |= SLOT_ENABLED;	dbg("Available resources:\n");	acpiphp_dump_resource(slot->bridge); err_exit:	return retval;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/42f49a6ae5dca90cd0594475502bf1c43ff1dc07/acpiphp_glue.c/buggy/drivers/pci/hotplug/acpiphp_glue.c