summaryrefslogtreecommitdiffstats
path: root/sound/oss
diff options
context:
space:
mode:
authorEldad Zack <eldad@fogrefinery.com>2013-04-29 21:15:46 +0200
committerTakashi Iwai <tiwai@suse.de>2013-04-30 09:19:02 +0200
commit4ca231b2e6ed171107c5b21f9e92d1965fd6fd9e (patch)
tree25acf07f6210c17b7a1f930e7d136d0202094dba /sound/oss
parent167d0a11d5feedd1f9cb9ae128ac543e97148eff (diff)
downloadlinux-4ca231b2e6ed171107c5b21f9e92d1965fd6fd9e.tar.bz2
ALSA: usb-audio: caiaq: fix endianness bug in snd_usb_caiaq_maschine_dispatch
Current code does this: be16_to_cpu(buf[i * 2] << 8 | buf[(i * 2) + 1]) Which is effectively (neglecting the index): be16_to_cpu(be16_to_cpu(*((u16 *) buf))) This means the int16 in the buffer is not converted at all. Daniel Mack confirmed that the driver works on little endian CPUs, leading to the conclusion that the device-side structure is actually little endian. This changes the code to use le16_to_cpu(). Caught by sparse. Acked-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/oss')
0 files changed, 0 insertions, 0 deletions