From ee8c9ce26661e83584f4cb5931b0815d38b2843a Mon Sep 17 00:00:00 2001 From: Rakesh Bodla Date: Wed, 16 May 2012 19:32:28 +0530 Subject: usb: gadget: android: add the handler for ptp class requests Adding the handler for control requests of ptp function driver. Bug 980195 Change-Id: I3ddfc44d7ec4a98d29c7358be1f1d34799f92be9 Signed-off-by: Rakesh Bodla Reviewed-on: http://git-master/r/103007 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty --- drivers/usb/gadget/android.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/usb/gadget/android.c b/drivers/usb/gadget/android.c index fbafe8a3bca4..4805670cf6e3 100644 --- a/drivers/usb/gadget/android.c +++ b/drivers/usb/gadget/android.c @@ -319,6 +319,13 @@ static int mtp_function_ctrlrequest(struct android_usb_function *f, return mtp_ctrlrequest(cdev, c); } +static int ptp_function_ctrlrequest(struct android_usb_function *f, + struct usb_composite_dev *cdev, + const struct usb_ctrlrequest *c) +{ + return mtp_ctrlrequest(cdev, c); +} + static struct android_usb_function mtp_function = { .name = "mtp", .init = mtp_function_init, @@ -333,6 +340,7 @@ static struct android_usb_function ptp_function = { .init = ptp_function_init, .cleanup = ptp_function_cleanup, .bind_config = ptp_function_bind_config, + .ctrlrequest = ptp_function_ctrlrequest, }; -- cgit v1.2.3