]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-arm/hardware/iop3xx-adma.h
iop_adma: cleanup iop_chan_xor_slot_count
[linux-2.6-omap-h63xx.git] / include / asm-arm / hardware / iop3xx-adma.h
index a32b86ac62aa4f4e325dd7c035270a88b072c392..af64676650a22b7f6817d0d809d4fc6d82d8966d 100644 (file)
@@ -260,7 +260,7 @@ static inline int iop_chan_memset_slot_count(size_t len, int *slots_per_op)
 static inline int iop3xx_aau_xor_slot_count(size_t len, int src_cnt,
                                        int *slots_per_op)
 {
-       static const int slot_count_table[] = { 0,
+       static const char slot_count_table[] = {
                                                1, 1, 1, 1, /* 01 - 04 */
                                                2, 2, 2, 2, /* 05 - 08 */
                                                4, 4, 4, 4, /* 09 - 12 */
@@ -270,7 +270,7 @@ static inline int iop3xx_aau_xor_slot_count(size_t len, int src_cnt,
                                                8, 8, 8, 8, /* 25 - 28 */
                                                8, 8, 8, 8, /* 29 - 32 */
                                              };
-       *slots_per_op = slot_count_table[src_cnt];
+       *slots_per_op = slot_count_table[src_cnt - 1];
        return *slots_per_op;
 }