OSDN Git Service

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:41:23 +0000 (09:41 +0200)
commitff8d97a822c65e8ae6ceaa67369c0d56f6797c9b
tree4e29c2cd1d982a967a8a636699be14d583155de1
parent381420a46ae521c34801314985c1ca7ee274b45e
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