From: Joe Perches Date: Tue, 28 Oct 2014 21:22:49 +0000 (-0700) Subject: ALSA: 6fire: Convert byte_rev_table uses to bitrev8 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9547c0999e50fd624cab52f94a79f0fd27a7cb84;p=openwrt%2Fstaging%2Fblogic.git ALSA: 6fire: Convert byte_rev_table uses to bitrev8 Use the inline function instead of directly indexing the array. This allows some architectures with hardware instructions for bit reversals to eliminate the array. Signed-off-by: Joe Perches Signed-off-by: Takashi Iwai --- diff --git a/sound/usb/6fire/firmware.c b/sound/usb/6fire/firmware.c index 3b02e54b8f6d..62c25e74f0e5 100644 --- a/sound/usb/6fire/firmware.c +++ b/sound/usb/6fire/firmware.c @@ -316,7 +316,7 @@ static int usb6fire_fw_fpga_upload( while (c != end) { for (i = 0; c != end && i < FPGA_BUFSIZE; i++, c++) - buffer[i] = byte_rev_table[(u8) *c]; + buffer[i] = bitrev8((u8)*c); ret = usb6fire_fw_fpga_write(device, buffer, i); if (ret < 0) {