From: Andrzej Pietrasiewicz Date: Mon, 15 Dec 2014 12:50:05 +0000 (+0100) Subject: usb: gadget: hid: consistently use 2^n - 1 for max values X-Git-Tag: firefly_0821_release~176^2~2323^2^2~190 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=39a2ac2738658fd3e56987fb8b43b604298e9ad2;p=firefly-linux-kernel-4.4.55.git usb: gadget: hid: consistently use 2^n - 1 for max values A maximum value which fits in 16 bits, unsigned, is 65535. Acked-by: Geert Uytterhoeven Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c index 6e04e302dc3a..9660ade9fdaa 100644 --- a/drivers/usb/gadget/function/f_hid.c +++ b/drivers/usb/gadget/function/f_hid.c @@ -758,7 +758,7 @@ static struct f_hid_opts_attribute f_hid_opts_##name = \ F_HID_OPT(subclass, 8, 255); F_HID_OPT(protocol, 8, 255); -F_HID_OPT(report_length, 16, 65536); +F_HID_OPT(report_length, 16, 65535); static ssize_t f_hid_opts_report_desc_show(struct f_hid_opts *opts, char *page) {