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: v4.0-rc1~85^2^2~190 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=39a2ac2738658fd3e56987fb8b43b604298e9ad2;p=linux.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) {