MTP: changes to use new usb_request support in libusbhost

Change-Id: Ic091eab166a66efcde0395dcebbbc513f2322fca
Signed-off-by: Mike Lockwood <lockwood@android.com>
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 @@
 
 #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