static int usb_kbd_probe(struct usb_interface *iface, 
static int usb_kbd_probe(struct usb_interface *iface, 
static int usb_kbd_probe(struct usb_interface *iface, 			 const struct usb_device_id *id){	struct usb_device * dev = interface_to_usbdev(iface);	struct usb_host_interface *interface;	struct usb_endpoint_descriptor *endpoint;	struct usb_kbd *kbd;	int i, pipe, maxp;	char path[64];	interface = iface->cur_altsetting;	if (interface->desc.bNumEndpoints != 1)		return -ENODEV;	endpoint = &interface->endpoint[0].desc;	if (!(endpoint->bEndpointAddress & 0x80))		return -ENODEV;	if ((endpoint->bmAttributes & 3) != 3)		return -ENODEV;	pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);	maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));	if (!(kbd = kmalloc(sizeof(struct usb_kbd), GFP_KERNEL)))		return -ENOMEM;	memset(kbd, 0, sizeof(struct usb_kbd));	if (usb_kbd_alloc_mem(dev, kbd)) {		usb_kbd_free_mem(dev, kbd);		kfree(kbd);		return -ENOMEM;	}	kbd->usbdev = dev;	kbd->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_LED) | BIT(EV_REP);	kbd->dev.ledbit[0] = BIT(LED_NUML) | BIT(LED_CAPSL) | BIT(LED_SCROLLL) | BIT(LED_COMPOSE) | BIT(LED_KANA);	for (i = 0; i < 255; i++)		set_bit(usb_kbd_keycode[i], kbd->dev.keybit);	clear_bit(0, kbd->dev.keybit);		kbd->dev.private = kbd;	kbd->dev.event = usb_kbd_event;	kbd->dev.open = usb_kbd_open;	kbd->dev.close = usb_kbd_close;	usb_fill_int_urb(kbd->irq, dev, pipe,			 kbd->new, (maxp > 8 ? 8 : maxp),			 usb_kbd_irq, kbd, endpoint->bInterval);	kbd->irq->transfer_dma = kbd->new_dma;	kbd->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;	kbd->cr->bRequestType = USB_TYPE_CLASS | USB_RECIP_INTERFACE;	kbd->cr->bRequest = 0x09;	kbd->cr->wValue = cpu_to_le16(0x200);	kbd->cr->wIndex = cpu_to_le16(interface->desc.bInterfaceNumber);	kbd->cr->wLength = cpu_to_le16(1);	usb_make_path(dev, path, 64);	sprintf(kbd->phys, "%s/input0", path);	kbd->dev.name = kbd->name;	kbd->dev.phys = kbd->phys;		kbd->dev.id.bustype = BUS_USB;	kbd->dev.id.vendor = le16_to_cpu(dev->descriptor.idVendor);	kbd->dev.id.product = le16_to_cpu(dev->descriptor.idProduct);	kbd->dev.id.version = le16_to_cpu(dev->descriptor.bcdDevice);	kbd->dev.dev = &iface->dev;	if (dev->manufacturer)		strcat(kbd->name, dev->manufacturer);	if (dev->product)		sprintf(kbd->name, "%s %s", kbd->name, dev->product);	if (!strlen(kbd->name))		sprintf(kbd->name, "USB HIDBP Keyboard %04x:%04x",			kbd->dev.id.vendor, kbd->dev.id.product);	usb_fill_control_urb(kbd->led, dev, usb_sndctrlpipe(dev, 0),			     (void *) kbd->cr, kbd->leds, 1,			     usb_kbd_led, kbd);	kbd->led->setup_dma = kbd->cr_dma;	kbd->led->transfer_dma = kbd->leds_dma;	kbd->led->transfer_flags |= (URB_NO_TRANSFER_DMA_MAP				| URB_NO_SETUP_DMA_MAP);	input_register_device(&kbd->dev);	printk(KERN_INFO "input: %s on %s\n", kbd->name, path);	usb_set_intfdata(iface, kbd);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/05f091ab4c8c1f12f8dd38ee789489904fea327d/usbkbd.c/clean/drivers/usb/input/usbkbd.c