summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorManu Gautam <mgautam@codeaurora.org>2017-03-20 17:00:52 +0530
committerManu Gautam <mgautam@codeaurora.org>2017-03-20 17:04:37 +0530
commit741ee549472cb814d9ffaa0e679b9ddc02eca192 (patch)
tree11382175eea1d1a934d6dcd6a80087e130ea371c /drivers/usb
parentf39a5999e2473e890390e3a5aa794a2fd4256544 (diff)
usb: gadget: ccid: Fix data types of header structures
Replace unsigned long with __u32 as 4 bytes is the length of field where as unsigned long could be 8 bytes on 64 bit machine. Also, replace short and char with u16 and u8 respectively for better readability. Change-Id: I8637f6b32d56d90c01b4453b4677f40d5b865bf6 Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/function/f_ccid.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/usb/gadget/function/f_ccid.h b/drivers/usb/gadget/function/f_ccid.h
index 42a7ebbbccfc..935308cff0bc 100644
--- a/drivers/usb/gadget/function/f_ccid.h
+++ b/drivers/usb/gadget/function/f_ccid.h
@@ -55,29 +55,29 @@
#define CCID_READ_DTR _IOR('C', 3, int)
struct usb_ccid_notification {
- unsigned char buf[4];
+ __u8 buf[4];
} __packed;
struct ccid_bulk_in_header {
- unsigned char bMessageType;
- unsigned long wLength;
- unsigned char bSlot;
- unsigned char bSeq;
- unsigned char bStatus;
- unsigned char bError;
- unsigned char bSpecific;
- unsigned char abData[ABDATA_SIZE];
- unsigned char bSizeToSend;
+ __u8 bMessageType;
+ __u32 wLength;
+ __u8 bSlot;
+ __u8 bSeq;
+ __u8 bStatus;
+ __u8 bError;
+ __u8 bSpecific;
+ __u8 abData[ABDATA_SIZE];
+ __u8 bSizeToSend;
} __packed;
struct ccid_bulk_out_header {
- unsigned char bMessageType;
- unsigned long wLength;
- unsigned char bSlot;
- unsigned char bSeq;
- unsigned char bSpecific_0;
- unsigned char bSpecific_1;
- unsigned char bSpecific_2;
- unsigned char APDU[ABDATA_SIZE];
+ __u8 bMessageType;
+ __u32 wLength;
+ __u8 bSlot;
+ __u8 bSeq;
+ __u8 bSpecific_0;
+ __u8 bSpecific_1;
+ __u8 bSpecific_2;
+ __u8 APDU[ABDATA_SIZE];
} __packed;
#endif