static int locomokbd_probe(struct locomo_dev *dev){	struct locomokbd *locomokbd;	int i, ret;	locomokbd = kmalloc(sizeof(struct locomokbd), GFP_KERNEL);	if (!locomokbd)		return -ENOMEM;	memset(locomokbd, 0, sizeof(struct locomokbd));	/* try and claim memory region */	if (!request_mem_region((unsigned long) dev->mapbase, 				dev->length, 				LOCOMO_DRIVER_NAME(dev))) {		ret = -EBUSY;		printk(KERN_ERR "locomokbd: Can't acquire access to io memory for keyboard\n");		goto free;	}	locomokbd->ldev = dev;	locomo_set_drvdata(dev, locomokbd);	locomokbd->base = (unsigned long) dev->mapbase;	spin_lock_init(&locomokbd->lock);	init_timer(&locomokbd->timer);	locomokbd->timer.function = locomokbd_timer_callback;	locomokbd->timer.data = (unsigned long) locomokbd;	locomokbd->input.evbit[0] = BIT(EV_KEY) | BIT(EV_REP);		init_input_dev(&locomokbd->input);	locomokbd->input.keycode = locomokbd->keycode;	locomokbd->input.keycodesize = sizeof(unsigned char);	locomokbd->input.keycodemax = ARRAY_SIZE(locomokbd_keycode);	locomokbd->input.private = locomokbd;	memcpy(locomokbd->keycode, locomokbd_keycode, sizeof(locomokbd->keycode));	for (i = 0; i < LOCOMOKBD_NUMKEYS; i++)		set_bit(locomokbd->keycode[i], locomokbd->input.keybit);	clear_bit(0, locomokbd->input.keybit);	strcpy(locomokbd->phys, "locomokbd/input0");	locomokbd->input.name = "LoCoMo keyboard";	locomokbd->input.phys = locomokbd->phys;	locomokbd->input.id.bustype = BUS_XTKBD;	locomokbd->input.id.vendor = 0x0001;	locomokbd->input.id.product = 0x0001;	locomokbd->input.id.version = 0x0100;	/* attempt to get the interrupt */	ret = request_irq(dev->irq[0], locomokbd_interrupt, 0, "locomokbd", locomokbd);	if (ret) {		printk(KERN_ERR "locomokbd: Can't get irq for keyboard\n");		goto out;	}	input_register_device(&locomokbd->input);	printk(KERN_INFO "input: LoCoMo keyboard on locomokbd\n");	return 0;out:	release_mem_region((unsigned long) dev->mapbase, dev->length);	locomo_set_drvdata(dev, NULL);free:	kfree(locomokbd);	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d083e90660657bf6bde508ba6c3eaa75eb4cf1f6/locomokbd.c/buggy/drivers/input/keyboard/locomokbd.c