Przeglądaj źródła

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 <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Joe Perches 10 lat temu
rodzic
commit
9547c0999e
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      sound/usb/6fire/firmware.c

+ 1 - 1
sound/usb/6fire/firmware.c

@@ -316,7 +316,7 @@ static int usb6fire_fw_fpga_upload(
 
 
 	while (c != end) {
 	while (c != end) {
 		for (i = 0; c != end && i < FPGA_BUFSIZE; i++, c++)
 		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);
 		ret = usb6fire_fw_fpga_write(device, buffer, i);
 		if (ret < 0) {
 		if (ret < 0) {