ACM gadget: fix endianness in notifications
authorOliver Neukum <oneukum@suse.com>
Tue, 14 Mar 2017 11:09:56 +0000 (12:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Mar 2017 07:44:04 +0000 (09:44 +0200)
commitc37fcc17bf36a97b9cb065b4a6179e9cdf7f99ea
treefe0ed09e8c6fcfe0d66f7c1918987e750de790ef
parent7cdfdddb2e612a8b606f5682f3ba11d66e18ad6b
ACM gadget: fix endianness in notifications

commit cdd7928df0d2efaa3270d711963773a08a4cc8ab upstream.

The gadget code exports the bitfield for serial status changes
over the wire in its internal endianness. The fix is to convert
to little endian before sending it over the wire.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Tested-by: 家瑋 <momo1208@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_acm.c