From 5a28ec07f43b7fafc742e88509915bfb295c6f64 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 8 Apr 2011 13:49:06 +0200 Subject: RC632: don't use RFID_14443A_SPEED_???K to index linear array The RFID_14443A_SPEED_???K are defined as 0x01, 0x02, 0x04, 0x08 to allow for bitmasks, thus we cannot directly use them to index an array. Instead we now use named array initializers Thanks to Gianni Tedesco for spotting this. --- src/rfid_asic_rc632.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/rfid_asic_rc632.c b/src/rfid_asic_rc632.c index 28bd5a1..4e8feee 100644 --- a/src/rfid_asic_rc632.c +++ b/src/rfid_asic_rc632.c @@ -1201,19 +1201,19 @@ static struct rx_config rx_configs[] = { }; static struct tx_config tx_configs[] = { - { + [RFID_14443A_SPEED_106K] = { .rate = RC632_CDRCTRL_RATE_106K, .mod_width = 0x13, }, - { + [RFID_14443A_SPEED_212K] = { .rate = RC632_CDRCTRL_RATE_212K, .mod_width = 0x07, }, - { + [RFID_14443A_SPEED_424K] = { .rate = RC632_CDRCTRL_RATE_424K, .mod_width = 0x03, }, - { + [RFID_14443A_SPEED_848K] = { .rate = RC632_CDRCTRL_RATE_848K, .mod_width = 0x01, }, -- cgit v1.2.3