diff options
author | Vijay Kumar <vijaykumar@bravegnu.org> | 2008-10-29 08:58:39 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-06 13:52:04 -0800 |
commit | bf437012503cc99519e20b4a8bddf830cdaae794 (patch) | |
tree | 2700595d825866aacb53646d645e28106a875982 | |
parent | ca219995b299a069dc0a88ddc24ac72423a81361 (diff) |
Staging: poch: Fix user space protocol syncing
Always set the user space offset from kernel space, to indicate group
transmitted/received.
Signed-off-by: Vijay Kumar <vijaykumar@bravegnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-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) spin_lock_irq(&channel->group_offsets_lock); for (i = 0; i < channel->group_count; i++) { - if (channel->dir == CHANNEL_DIR_RX - && channel->header->group_offsets[i] == -1) { - spin_unlock_irq(&channel->group_offsets_lock); - return 1; - } - - if (channel->dir == CHANNEL_DIR_TX - && channel->header->group_offsets[i] != -1) { + if (channel->header->group_offsets[i] != -1) { spin_unlock_irq(&channel->group_offsets_lock); return 1; } @@ -1103,10 +1096,7 @@ static void poch_irq_dma(struct channel_info *channel) for (i = 0; i < groups_done; i++) { j = (prev_transfer + i) % channel->group_count; - if (channel->dir == CHANNEL_DIR_RX) - group_offsets[j] = -1; - else - group_offsets[j] = groups[j].user_offset; + group_offsets[j] = groups[j].user_offset; } spin_unlock(&channel->group_offsets_lock); |