summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpRequestPacket.cpp
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2011-01-04 14:48:57 -0500
committerMike Lockwood <lockwood@android.com>2011-01-06 11:46:55 -0500
commit42d0b79a787814d42e4c6f9dfe14f13cc0f6a758 (patch)
tree9cb2c20fb8bf7d6b53c093c8e3dceb5dc0374523 /media/mtp/MtpRequestPacket.cpp
parentd1108d74e13a74dc72e49513e0393e924f3d112c (diff)
downloadframeworks_av-42d0b79a787814d42e4c6f9dfe14f13cc0f6a758.zip
frameworks_av-42d0b79a787814d42e4c6f9dfe14f13cc0f6a758.tar.gz
frameworks_av-42d0b79a787814d42e4c6f9dfe14f13cc0f6a758.tar.bz2
MTP: changes to use new usb_request support in libusbhost
Change-Id: Ic091eab166a66efcde0395dcebbbc513f2322fca Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'media/mtp/MtpRequestPacket.cpp')
-rw-r--r--media/mtp/MtpRequestPacket.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/media/mtp/MtpRequestPacket.cpp b/media/mtp/MtpRequestPacket.cpp
index 8ece580..0e58e01 100644
--- a/media/mtp/MtpRequestPacket.cpp
+++ b/media/mtp/MtpRequestPacket.cpp
@@ -22,6 +22,8 @@
#include "MtpRequestPacket.h"
+#include <usbhost/usbhost.h>
+
namespace android {
MtpRequestPacket::MtpRequestPacket()
@@ -45,11 +47,13 @@ int MtpRequestPacket::read(int fd) {
#ifdef MTP_HOST
// write our buffer to the given endpoint (host mode)
-int MtpRequestPacket::write(struct usb_endpoint *ep)
+int MtpRequestPacket::write(struct usb_request *request)
{
putUInt32(MTP_CONTAINER_LENGTH_OFFSET, mPacketSize);
putUInt16(MTP_CONTAINER_TYPE_OFFSET, MTP_CONTAINER_TYPE_COMMAND);
- return transfer(ep, mBuffer, mPacketSize);
+ request->buffer = mBuffer;
+ request->buffer_length = mPacketSize;
+ return transfer(request);
}
#endif