Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e3a6d17 authored by Mike Lockwood's avatar Mike Lockwood Committed by Android (Google) Code Review
Browse files

Merge changes Ibe4ce055,I3bcba4c9

* changes:
  libusbhost: add usb_endpoint_get_device()
  adb: remove unnecessary include
parents 758582c9 5e567cb3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@
#include <string.h>

#include <usbhost/usbhost.h>
#include <linux/usbdevice_fs.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20)
#include <linux/usb/ch9.h>
+3 −0
Original line number Diff line number Diff line
@@ -126,6 +126,9 @@ int usb_endpoint_wait(struct usb_device *device, int *out_ep_num);
/* Cancels a pending usb_endpoint_queue() operation on an endpoint. */
int usb_endpoint_cancel(struct usb_endpoint *ep);

/* Returns the usb_device for the given endpoint */
struct usb_device *usb_endpoint_get_device(struct usb_endpoint *ep);

/* Returns the endpoint address for the given endpoint */
int usb_endpoint_number(struct usb_endpoint *ep);

+5 −0
Original line number Diff line number Diff line
@@ -444,6 +444,11 @@ int usb_endpoint_cancel(struct usb_endpoint *ep)
    return ioctl(ep->dev->fd, USBDEVFS_DISCARDURB, &ep->urb);
}

struct usb_device *usb_endpoint_get_device(struct usb_endpoint *ep)
{
    return ep->dev;
}

int usb_endpoint_number(struct usb_endpoint *ep)
{
    return ep->desc.bEndpointAddress;