struct slot *p_slot; 
struct controller *ctrl = p_slot->ctrl; 
static u32 remove_board(struct pci_func *func, struct controller *ctrl){	u8 device;	u8 hp_slot;	u32 rc;	struct slot *p_slot;	if (func == NULL)		return 1;	if (pciehp_unconfigure_device(func))		return 1;	device = func->device;	hp_slot = func->device - ctrl->slot_device_offset;	p_slot = pciehp_find_slot(ctrl, hp_slot + ctrl->slot_device_offset);	dbg("In %s, hp_slot = %d\n", __FUNCTION__, hp_slot);	/* Change status to shutdown */	if (func->is_a_board)		func->status = 0x01;	func->configured = 0;	/* Wait for exclusive access to hardware */	down(&ctrl->crit_sect);	if (POWER_CTRL(ctrl->ctrlcap)) {		/* power off slot */		rc = p_slot->hpc_ops->power_off_slot(p_slot);		if (rc) {			err("%s: Issue of Slot Disable command failed\n", __FUNCTION__);			up(&ctrl->crit_sect);			return rc;		}		/* Wait for the command to complete */		wait_for_ctrl_irq (ctrl);	}	if (PWR_LED(ctrl->ctrlcap)) {		/* turn off Green LED */		p_slot->hpc_ops->green_led_off(p_slot);			/* Wait for the command to complete */		wait_for_ctrl_irq (ctrl);	}	/* Done with exclusive hardware access */	up(&ctrl->crit_sect);	if (ctrl->add_support) {		while (func) {			if (is_bridge(func)) {				dbg("PCI Bridge Hot-Remove s:b:d:f(%02x:%02x:%02x:%02x)\n", 					ctrl->seg, func->bus, func->device, func->function);				bridge_slot_remove(func);			} else {				dbg("PCI Function Hot-Remove s:b:d:f(%02x:%02x:%02x:%02x)\n", 					ctrl->seg, func->bus, func->device, func->function);				slot_remove(func);			}			func = pciehp_slot_find(ctrl->slot_bus, device, 0);		}		/* Setup slot structure with entry for empty slot */		func = pciehp_slot_create(ctrl->slot_bus);		if (func == NULL) {			return 1;		}		func->bus = ctrl->slot_bus;		func->device = device;		func->function = 0;		func->configured = 0;		func->switch_save = 0x10;		func->is_a_board = 0;	}	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/ca22a5e4d70620b7f3d809e424daa5214b0aa00d/pciehp_ctrl.c/buggy/drivers/pci/hotplug/pciehp_ctrl.c