if (interface->desc.bNumEndpoints != 1) 
if (interface->desc.bNumEndpoints != 1) 
static int usb_mouse_probe(struct usb_interface * intf, const struct usb_device_id * id){	struct usb_device * dev = interface_to_usbdev(intf);	struct usb_host_interface *interface;	struct usb_endpoint_descriptor *endpoint;	struct usb_mouse *mouse;	int pipe, maxp;	char path[64];	interface = intf->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 (!(mouse = kmalloc(sizeof(struct usb_mouse), GFP_KERNEL))) 		return -ENOMEM;	memset(mouse, 0, sizeof(struct usb_mouse));	mouse->data = usb_buffer_alloc(dev, 8, SLAB_ATOMIC, &mouse->data_dma);	if (!mouse->data) {		kfree(mouse);		return -ENOMEM;	}	mouse->irq = usb_alloc_urb(0, GFP_KERNEL);	if (!mouse->irq) {		usb_buffer_free(dev, 8, mouse->data, mouse->data_dma);		kfree(mouse);		return -ENODEV;	}	mouse->usbdev = dev;	mouse->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_REL);	mouse->dev.keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);	mouse->dev.relbit[0] = BIT(REL_X) | BIT(REL_Y);	mouse->dev.keybit[LONG(BTN_MOUSE)] |= BIT(BTN_SIDE) | BIT(BTN_EXTRA);	mouse->dev.relbit[0] |= BIT(REL_WHEEL);	mouse->dev.private = mouse;	mouse->dev.open = usb_mouse_open;	mouse->dev.close = usb_mouse_close;	usb_make_path(dev, path, 64);	sprintf(mouse->phys, "%s/input0", path);	mouse->dev.name = mouse->name;	mouse->dev.phys = mouse->phys;	mouse->dev.id.bustype = BUS_USB;	mouse->dev.id.vendor = le16_to_cpu(dev->descriptor.idVendor);	mouse->dev.id.product = le16_to_cpu(dev->descriptor.idProduct);	mouse->dev.id.version = le16_to_cpu(dev->descriptor.bcdDevice);	mouse->dev.dev = &intf->dev;	if (dev->manufacturer)		strcat(mouse->name, dev->manufacturer);	if (dev->product)		sprintf(mouse->name, "%s %s", mouse->name, dev->product);	if (!strlen(mouse->name))		sprintf(mouse->name, "USB HIDBP Mouse %04x:%04x",			mouse->dev.id.vendor, mouse->dev.id.product);	usb_fill_int_urb(mouse->irq, dev, pipe, mouse->data,			 (maxp > 8 ? 8 : maxp),			 usb_mouse_irq, mouse, endpoint->bInterval);	mouse->irq->transfer_dma = mouse->data_dma;	mouse->irq->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;	input_register_device(&mouse->dev);	printk(KERN_INFO "input: %s on %s\n", mouse->name, path);	usb_set_intfdata(intf, mouse);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/05f091ab4c8c1f12f8dd38ee789489904fea327d/usbmouse.c/clean/drivers/usb/input/usbmouse.c