return; 
return 0; 
static void hil_kbd_connect(struct serio *serio, struct serio_driver *drv){	struct hil_kbd	*kbd;	uint8_t		did, *idd;	int		i;		if (serio->type != (SERIO_HIL_MLC | SERIO_HIL)) return;	if (!(kbd = kmalloc(sizeof(struct hil_kbd), GFP_KERNEL))) return;	memset(kbd, 0, sizeof(struct hil_kbd));	if (serio_open(serio, drv)) goto bail0;	serio->private = kbd;	kbd->serio = serio;	kbd->dev.private = kbd;	init_MUTEX_LOCKED(&(kbd->sem));	/* Get device info.  MLC driver supplies devid/status/etc. */	serio->write(serio, 0);	serio->write(serio, 0);	serio->write(serio, HIL_PKT_CMD >> 8);	serio->write(serio, HIL_CMD_IDD);	down(&(kbd->sem));	serio->write(serio, 0);	serio->write(serio, 0);	serio->write(serio, HIL_PKT_CMD >> 8);	serio->write(serio, HIL_CMD_RSC);	down(&(kbd->sem));	serio->write(serio, 0);	serio->write(serio, 0);	serio->write(serio, HIL_PKT_CMD >> 8);	serio->write(serio, HIL_CMD_RNM);	down(&(kbd->sem));	serio->write(serio, 0);	serio->write(serio, 0);	serio->write(serio, HIL_PKT_CMD >> 8);	serio->write(serio, HIL_CMD_EXD);	down(&(kbd->sem));	up(&(kbd->sem));	did = kbd->idd[0];	idd = kbd->idd + 1;	switch (did & HIL_IDD_DID_TYPE_MASK) {	case HIL_IDD_DID_TYPE_KB_INTEGRAL:	case HIL_IDD_DID_TYPE_KB_ITF:	case HIL_IDD_DID_TYPE_KB_RSVD:	case HIL_IDD_DID_TYPE_CHAR:		printk(KERN_INFO PREFIX "HIL keyboard found (did = 0x%02x, lang = %s)\n",			did, hil_language[did & HIL_IDD_DID_TYPE_KB_LANG_MASK]);		break;	default:		goto bail1;	}	if(HIL_IDD_NUM_BUTTONS(idd) || HIL_IDD_NUM_AXES_PER_SET(*idd)) {		printk(KERN_INFO PREFIX "keyboards only, no combo devices supported.\n");		goto bail1;	}	kbd->dev.evbit[0]	= BIT(EV_KEY) | BIT(EV_REP);	kbd->dev.ledbit[0]	= BIT(LED_NUML) | BIT(LED_CAPSL) | BIT(LED_SCROLLL);	kbd->dev.keycodemax	= HIL_KEYCODES_SET1_TBLSIZE;	kbd->dev.keycodesize	= sizeof(hil_kbd_set1[0]);	kbd->dev.keycode	= hil_kbd_set1;	kbd->dev.name		= strlen(kbd->rnm) ? kbd->rnm : HIL_GENERIC_NAME;	kbd->dev.phys		= "hpkbd/input0";	/* XXX */	kbd->dev.id.bustype	= BUS_HIL;	kbd->dev.id.vendor	= PCI_VENDOR_ID_HP;	kbd->dev.id.product	= 0x0001; /* TODO: get from kbd->rsc */	kbd->dev.id.version	= 0x0100; /* TODO: get from kbd->rsc */	kbd->dev.dev		= &serio->dev;	for (i = 0; i < 128; i++) {		set_bit(hil_kbd_set1[i], kbd->dev.keybit);		set_bit(hil_kbd_set3[i], kbd->dev.keybit);	}	clear_bit(0, kbd->dev.keybit);	input_register_device(&kbd->dev);	printk(KERN_INFO "input: %s, ID: %d\n",		kbd->dev.name, did);	serio->write(serio, 0);	serio->write(serio, 0);	serio->write(serio, HIL_PKT_CMD >> 8);	serio->write(serio, HIL_CMD_EK1); /* Enable Keyswitch Autorepeat 1 */	down(&(kbd->sem));	up(&(kbd->sem));	return; bail1:	serio_close(serio); bail0:	kfree(kbd);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/6ab0f5cd364476fe5cb329fd46ee41bea6d4c69c/hil_kbd.c/clean/drivers/input/keyboard/hil_kbd.c