usbmouse.c (762f99f4f3cb41a775b5157dd761217beba65873) usbmouse.c (b45cde330ba7b52e4c9ea9b36b4a58d32b387441)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (c) 1999-2001 Vojtech Pavlik
4 *
5 * USB HIDBP Mouse support
6 */
7
8/*

--- 109 unchanged lines hidden (view full) ---

118 if (interface->desc.bNumEndpoints != 1)
119 return -ENODEV;
120
121 endpoint = &interface->endpoint[0].desc;
122 if (!usb_endpoint_is_int_in(endpoint))
123 return -ENODEV;
124
125 pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Copyright (c) 1999-2001 Vojtech Pavlik
4 *
5 * USB HIDBP Mouse support
6 */
7
8/*

--- 109 unchanged lines hidden (view full) ---

118 if (interface->desc.bNumEndpoints != 1)
119 return -ENODEV;
120
121 endpoint = &interface->endpoint[0].desc;
122 if (!usb_endpoint_is_int_in(endpoint))
123 return -ENODEV;
124
125 pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
126 maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
126 maxp = usb_maxpacket(dev, pipe);
127
128 mouse = kzalloc(sizeof(struct usb_mouse), GFP_KERNEL);
129 input_dev = input_allocate_device();
130 if (!mouse || !input_dev)
131 goto fail1;
132
133 mouse->data = usb_alloc_coherent(dev, 8, GFP_KERNEL, &mouse->data_dma);
134 if (!mouse->data)

--- 98 unchanged lines hidden ---
127
128 mouse = kzalloc(sizeof(struct usb_mouse), GFP_KERNEL);
129 input_dev = input_allocate_device();
130 if (!mouse || !input_dev)
131 goto fail1;
132
133 mouse->data = usb_alloc_coherent(dev, 8, GFP_KERNEL, &mouse->data_dma);
134 if (!mouse->data)

--- 98 unchanged lines hidden ---