BACKPORT: arm64: Factor out TTBR0_EL1 post-update workaround into a specific asm...
[firefly-linux-kernel-4.4.55.git] / include / linux / usb / f_mtp.h
index 72a432e2fcdd66ca0cd89b7fc84e174c4c38c3b4..4e8417791bea47c498939a81334f043a980b0a4f 100644 (file)
 #ifndef __LINUX_USB_F_MTP_H
 #define __LINUX_USB_F_MTP_H
 
-#include <linux/ioctl.h>
-
-#ifdef __KERNEL__
-
-struct mtp_data_header {
-       /* length of packet, including this header */
-       uint32_t        length;
-       /* container type (2 for data packet) */
-       uint16_t        type;
-       /* MTP command code */
-       uint16_t    command;
-       /* MTP transaction ID */
-       uint32_t        transaction_id;
-};
-
-#endif /* __KERNEL__ */
-
-struct mtp_file_range {
-       /* file descriptor for file to transfer */
-       int                     fd;
-       /* offset in file for start of transfer */
-       loff_t          offset;
-       /* number of bytes to transfer */
-       int64_t         length;
-       /* MTP command ID for data header,
-        * used only for MTP_SEND_FILE_WITH_HEADER
-        */
-       uint16_t        command;
-       /* MTP transaction ID for data header,
-        * used only for MTP_SEND_FILE_WITH_HEADER
-        */
-       uint32_t        transaction_id;
-};
-
-struct mtp_event {
-       /* size of the event */
-       size_t          length;
-       /* event data to send */
-       void            *data;
-};
-
-/* 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.
- * The file is created if it does not exist.
- */
-#define MTP_RECEIVE_FILE           _IOW('M', 1, struct mtp_file_range)
-/* Sends an event to the host via the interrupt endpoint */
-#define MTP_SEND_EVENT             _IOW('M', 3, struct mtp_event)
-/* Sends the specified file range to the host,
- * with a 12 byte MTP data packet header at the beginning.
- */
-#define MTP_SEND_FILE_WITH_HEADER  _IOW('M', 4, struct mtp_file_range)
+#include <uapi/linux/usb/f_mtp.h>
 
 #endif /* __LINUX_USB_F_MTP_H */