summaryrefslogtreecommitdiff
path: root/drivers/input/mouse/synaptics_usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/mouse/synaptics_usb.c')
-rw-r--r--drivers/input/mouse/synaptics_usb.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/drivers/input/mouse/synaptics_usb.c b/drivers/input/mouse/synaptics_usb.c
index 75e45f3ae675..880a0c79148c 100644
--- a/drivers/input/mouse/synaptics_usb.c
+++ b/drivers/input/mouse/synaptics_usb.c
@@ -220,25 +220,6 @@ resubmit:
__func__, error);
}
-static struct usb_endpoint_descriptor *
-synusb_get_in_endpoint(struct usb_host_interface *iface)
-{
-
- struct usb_endpoint_descriptor *endpoint;
- int i;
-
- for (i = 0; i < iface->desc.bNumEndpoints; ++i) {
- endpoint = &iface->endpoint[i].desc;
-
- if (usb_endpoint_is_int_in(endpoint)) {
- /* we found our interrupt in endpoint */
- return endpoint;
- }
- }
-
- return NULL;
-}
-
static int synusb_open(struct input_dev *dev)
{
struct synusb *synusb = input_get_drvdata(dev);
@@ -307,11 +288,11 @@ static int synusb_probe(struct usb_interface *intf,
return error;
}
- ep = synusb_get_in_endpoint(intf->cur_altsetting);
- if (!ep)
+ error = usb_find_int_in_endpoint(intf->cur_altsetting, &ep);
+ if (error)
return -ENODEV;
- synusb = kzalloc(sizeof(*synusb), GFP_KERNEL);
+ synusb = kzalloc_obj(*synusb);
input_dev = input_allocate_device();
if (!synusb || !input_dev) {
error = -ENOMEM;