summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpEventPacket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/mtp/MtpEventPacket.cpp')
-rw-r--r--media/mtp/MtpEventPacket.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/media/mtp/MtpEventPacket.cpp b/media/mtp/MtpEventPacket.cpp
index fc74542..d2fca42 100644
--- a/media/mtp/MtpEventPacket.cpp
+++ b/media/mtp/MtpEventPacket.cpp
@@ -27,6 +27,8 @@
#include "MtpEventPacket.h"
+#include <usbhost/usbhost.h>
+
namespace android {
MtpEventPacket::MtpEventPacket()
@@ -52,9 +54,10 @@ int MtpEventPacket::write(int fd) {
#endif
#ifdef MTP_HOST
- // read our buffer from the given endpoint
-int MtpEventPacket::read(struct usb_endpoint *ep) {
- int ret = transfer(ep, mBuffer, mBufferSize);
+int MtpEventPacket::read(struct usb_request *request) {
+ request->buffer = mBuffer;
+ request->buffer_length = mBufferSize;
+ int ret = transfer(request);
if (ret >= 0)
mPacketSize = ret;
else