diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/poch/poch.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/staging/poch/poch.c b/drivers/staging/poch/poch.c index 0a3eca14075..3ecbd7c43c4 100644 --- a/drivers/staging/poch/poch.c +++ b/drivers/staging/poch/poch.c | |||
@@ -948,14 +948,7 @@ static int poch_channel_available(struct channel_info *channel) | |||
948 | spin_lock_irq(&channel->group_offsets_lock); | 948 | spin_lock_irq(&channel->group_offsets_lock); |
949 | 949 | ||
950 | for (i = 0; i < channel->group_count; i++) { | 950 | for (i = 0; i < channel->group_count; i++) { |
951 | if (channel->dir == CHANNEL_DIR_RX | 951 | if (channel->header->group_offsets[i] != -1) { |
952 | && channel->header->group_offsets[i] == -1) { | ||
953 | spin_unlock_irq(&channel->group_offsets_lock); | ||
954 | return 1; | ||
955 | } | ||
956 | |||
957 | if (channel->dir == CHANNEL_DIR_TX | ||
958 | && channel->header->group_offsets[i] != -1) { | ||
959 | spin_unlock_irq(&channel->group_offsets_lock); | 952 | spin_unlock_irq(&channel->group_offsets_lock); |
960 | return 1; | 953 | return 1; |
961 | } | 954 | } |
@@ -1103,10 +1096,7 @@ static void poch_irq_dma(struct channel_info *channel) | |||
1103 | 1096 | ||
1104 | for (i = 0; i < groups_done; i++) { | 1097 | for (i = 0; i < groups_done; i++) { |
1105 | j = (prev_transfer + i) % channel->group_count; | 1098 | j = (prev_transfer + i) % channel->group_count; |
1106 | if (channel->dir == CHANNEL_DIR_RX) | 1099 | group_offsets[j] = groups[j].user_offset; |
1107 | group_offsets[j] = -1; | ||
1108 | else | ||
1109 | group_offsets[j] = groups[j].user_offset; | ||
1110 | } | 1100 | } |
1111 | 1101 | ||
1112 | spin_unlock(&channel->group_offsets_lock); | 1102 | spin_unlock(&channel->group_offsets_lock); |