/* get root pci bridge's current resources */ status = acpi_get_crs(ab); if (ACPI_FAILURE(status)) { err("acpi_pciehprm:%s evaluate _CRS fail=0x%x\n", path_name, status); kfree(ab); return NULL; }  
static struct acpi_bridge * add_host_bridge(	acpi_handle handle,	ulong	segnum,	ulong	busnum	){	ulong			adr = 0;	acpi_status		status;	struct acpi_bridge	*ab;	u8			*path_name = acpi_path_name(handle);	/* get device, function: host br adr is always 0000 though.  */	status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, &adr);	if (ACPI_FAILURE(status)) {		err("acpi_pciehprm:%s _ADR fail=0x%x\n", path_name, status);		return NULL;	}	dbg("acpi_pciehprm: ROOT PCI seg(0x%x)bus(0x%x)dev(0x%x)func(0x%x) [%s]\n", (u32)segnum, 		(u32)busnum, (u32)(adr >> 16) & 0xffff, (u32)adr & 0xffff, path_name);	ab = (struct acpi_bridge *) kmalloc (sizeof(struct acpi_bridge), GFP_KERNEL);	if (!ab) {		err("acpi_pciehprm: alloc for ab fail\n");		return NULL;	}	memset(ab, 0, sizeof(struct acpi_bridge));	ab->handle = handle;	ab->seg = (int)segnum;	ab->bus = ab->pbus = (int)busnum;	ab->pdevice = (int)(adr >> 16) & 0xffff;	ab->pfunction = (int)(adr & 0xffff);	ab->scanned = 0;	ab->type = BRIDGE_TYPE_HOST;	/* get root pci bridge's current resources */	status = acpi_get_crs(ab);	if (ACPI_FAILURE(status)) {		err("acpi_pciehprm:%s evaluate _CRS fail=0x%x\n", path_name, status);		kfree(ab);		return NULL;	}	status = pci_osc_control_set (OSC_PCI_EXPRESS_NATIVE_HP_CONTROL); 	if (ACPI_FAILURE(status)) {		err("%s: status %x\n", __FUNCTION__, status);		osc_run_status = (status == AE_NOT_FOUND) ? OSC_NOT_EXIST : OSC_RUN_FAILED;	} else {		osc_run_status = NC_RUN_SUCCESS;	}		dbg("%s: osc_run_status %x\n", __FUNCTION__, osc_run_status);		build_a_bridge(ab, ab);	return ab;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/71b720c0f96145f5868c87591c286b290bc1a6af/pciehprm_acpi.c/buggy/drivers/pci/hotplug/pciehprm_acpi.c