rem: int8 deviceId;
add: int8 deviceId = -1;
context: mouse_open(const char *name, uint32 flags, void **cookie){	status_t status;		int8 commandByte;	int8 deviceId;		TRACE(("mouse_open()\n"));			if (atomic_or(&sOpenMask, 1) != 0)		return B_BUSY;		// get device id	write_aux_byte(PS2_CMD_GET_DEVICE_ID);	if (read_data_byte() == PS2_RES_ACK)		deviceId = read_data_byte();		TRACE(("init_driver: device id: %2x\n", deviceId));			if (deviceId == 0) {		// try to switch to intellimouse mode		ps2_set_sample_rate(200);		ps2_set_sample_rate(100);		ps2_set_sample_rate(80);	} 		// get device id, again	write_aux_byte(PS2_CMD_GET_DEVICE_ID);	if (read_data_byte() == PS2_RES_ACK)		deviceId = read_data_byte();		if (deviceId == PS2_DEV_ID_STANDARD) {		sPacketSize = PS2_PACKET_STANDARD;		TRACE(("Standard ps2 mouse found\n"));	} else if (deviceId == PS2_DEV_ID_INTELLIMOUSE) {		sPacketSize = PS2_PACKET_INTELLIMOUSE;		TRACE(("Extended ps2 mouse found\n"));	} else {		TRACE(("No mouse found\n"));		put_module(B_ISA_MODULE_NAME);		return B_ERROR;	// Something's wrong. Better quit	}		sMouseChain = cbuf_get_chain(MOUSE_HISTORY_SIZE);	if (sMouseChain == NULL) {		TRACE(("can't allocate cbuf chain\n"));		put_module(B_ISA_MODULE_NAME);		return B_ERROR;	}		// create the mouse semaphore, used for synchronization between	// the interrupt handler and the read operation	sMouseSem = create_sem(0, "ps2_mouse_sem");	if (sMouseSem < 0) {		TRACE(("failed creating PS/2 mouse semaphore!\n"));		cbuf_free_chain(sMouseChain);		put_module(B_ISA_MODULE_NAME);		return sMouseSem;	}		set_sem_owner(sMouseSem, B_SYSTEM_TEAM);			*cookie = NULL;		commandByte = get_command_byte();	commandByte |= PS2_BITS_AUX_INTERRUPT;	commandByte &= ~PS2_BITS_MOUSE_DISABLED;	set_command_byte(commandByte);		status = ps2_enable_mouse(true);	if (status < B_OK) {		TRACE(("mouse_open(): cannot enable PS/2 mouse\n"));			return B_ERROR;	}			TRACE(("mouse_open(): mouse succesfully enabled\n"));		// register interrupt handler	status = install_io_interrupt_handler(INT_PS2_MOUSE, handle_mouse_interrupt, NULL, 0);		return status;}