ANDROID: usb: gadget: f_mtp: don't use le16 for u8 field
authorBrian Norris <briannorris@google.com>
Tue, 1 Mar 2016 01:44:51 +0000 (17:44 -0800)
committerBrian Norris <briannorris@google.com>
Tue, 1 Mar 2016 19:59:49 +0000 (11:59 -0800)
The 'bCount' field is u8. Noticed by this warning:

drivers/usb/gadget/function/f_mtp.c:264:3: warning: large integer implicitly truncated to unsigned type [-Woverflow]

Change-Id: Ie82dfd1a8986ecd3acf143e41c46822f0d1aca4f
Signed-off-by: Brian Norris <briannorris@google.com>
drivers/usb/gadget/function/f_mtp.c

index aec7b8d61fe75a8e89c338e8d470135a5e82cf91..8f80a7e91314d705b6265a8c7080289707695cf3 100644 (file)
@@ -261,7 +261,7 @@ struct {
                .dwLength = __constant_cpu_to_le32(sizeof(mtp_ext_config_desc)),
                .bcdVersion = __constant_cpu_to_le16(0x0100),
                .wIndex = __constant_cpu_to_le16(4),
-               .bCount = __constant_cpu_to_le16(1),
+               .bCount = 1,
        },
        .function = {
                .bFirstInterfaceNumber = 0,