ALSA: 6fire: Convert byte_rev_table uses to bitrev8
authorJoe Perches <joe@perches.com>
Tue, 28 Oct 2014 21:22:49 +0000 (14:22 -0700)
committerTakashi Iwai <tiwai@suse.de>
Fri, 14 Nov 2014 07:01:53 +0000 (08:01 +0100)
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 <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/6fire/firmware.c

index 3b02e54b8f6db7e6e467edb9b4b8c2981c4dc8f1..62c25e74f0e52542b06acd2f57e47164d408d56d 100644 (file)
@@ -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) {