summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorRohith Seelaboyina <rseelaboyina@nvidia.com>2014-03-05 16:10:00 +0530
committerRohith Seelaboyina <rseelaboyina@nvidia.com>2014-03-17 23:33:20 -0700
commitc4367afe1d2bc3eca18ba8b83001869351fd30f1 (patch)
treeca2503c07677936442b24fa4aba4c82984c549dc /include/uapi
parent1dd32f36c0244eb8a09fe035558b66f29c254514 (diff)
usb: gadget: mtp: add new ioctl for compat
Define a new ioctl for MTP_SEND_EVENT, as its ioctl numbers depends on the size of struct mtp_event, which varies in ARCH32 and ARCH64. Bug 1466403 Change-Id: I1d172aae422ca483b00c6dd59e739166f40c53ce Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com> Reviewed-on: http://git-master/r/377800 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/usb/f_mtp.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/uapi/linux/usb/f_mtp.h b/include/uapi/linux/usb/f_mtp.h
index 503291855abd..8200730648e6 100644
--- a/include/uapi/linux/usb/f_mtp.h
+++ b/include/uapi/linux/usb/f_mtp.h
@@ -4,6 +4,8 @@
* Copyright (C) 2010 Google, Inc.
* Author: Mike Lockwood <lockwood@android.com>
*
+ * Copyright (C) 2014, NVIDIA CORPORATION. All rights reserved.
+ *
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
@@ -44,7 +46,15 @@ struct mtp_event {
/* event data to send */
void *data;
};
-
+#ifdef CONFIG_COMPAT
+struct mtp_event_32 {
+ /* size of the event */
+ u32 length;
+ /* event data to send */
+ u32 data;
+};
+#define MTP_SEND_EVENT_32 _IOW('M', 3, struct mtp_event_32)
+#endif
/* Sends the specified file range to the host */
#define MTP_SEND_FILE _IOW('M', 0, struct mtp_file_range)
/* Receives data from the host and writes it to a file.