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