ipmi_version = halt_recv_msg.msg.data[5]; 
static void ipmi_po_new_smi(int if_num){	struct ipmi_system_interface_addr smi_addr;	struct kernel_ipmi_msg            send_msg;	int                               rv;	int                               i;	if (ready)		return;	rv = ipmi_create_user(if_num, &ipmi_poweroff_handler, NULL,			      &ipmi_user);	if (rv) {		printk(KERN_ERR PFX "could not create IPMI user, error %d\n",		       rv);		return;	}        /*         * Do a get device ide and store some results, since this is	 * used by several functions.         */        smi_addr.addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE;        smi_addr.channel = IPMI_BMC_CHANNEL;        smi_addr.lun = 0;	send_msg.netfn = IPMI_NETFN_APP_REQUEST;	send_msg.cmd = IPMI_GET_DEVICE_ID_CMD;	send_msg.data = NULL;	send_msg.data_len = 0;	rv = ipmi_request_wait_for_response(ipmi_user,					    (struct ipmi_addr *) &smi_addr,					    &send_msg);	if (rv) {		printk(KERN_ERR PFX "Unable to send IPMI get device id info,"		       " IPMI error 0x%x\n", rv);		goto out_err;	}	if (halt_recv_msg.msg.data_len < 12) {		printk(KERN_ERR PFX "(chassis) IPMI get device id info too,"		       " short, was %d bytes, needed %d bytes\n",		       halt_recv_msg.msg.data_len, 12);		goto out_err;	}	mfg_id = (halt_recv_msg.msg.data[7]		  | (halt_recv_msg.msg.data[8] << 8)		  | (halt_recv_msg.msg.data[9] << 16));	prod_id = (halt_recv_msg.msg.data[10]		   | (halt_recv_msg.msg.data[11] << 8));	capabilities = halt_recv_msg.msg.data[6];	/* Scan for a poweroff method */	for (i=0; i<NUM_PO_FUNCS; i++) {		if (poweroff_functions[i].detect(ipmi_user))			goto found;	} out_err:	printk(KERN_ERR PFX "Unable to find a poweroff function that"	       " will work, giving up\n");	ipmi_destroy_user(ipmi_user);	return; found:	printk(KERN_INFO PFX "Found a %s style poweroff function\n",	       poweroff_functions[i].platform_type);	specific_poweroff_func = poweroff_functions[i].poweroff_func;	old_poweroff_func = pm_power_off;	pm_power_off = ipmi_poweroff_function;	ready = 1;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/168524d673f99550d75af49eb3f5d2850420eb66/ipmi_poweroff.c/buggy/drivers/char/ipmi/ipmi_poweroff.c