提交 ace32865 编写于 作者: M Mike Frysinger 提交者: Linus Torvalds

Blackfin SPI Driver: use len_in_bytes when we care about the number of bytes transferred

Use len_in_bytes when we care about the number of bytes transferred rather
than the number of spi transactions.  (this value will be the same for
8bit transfers, but not any other sizes)
Signed-off-by: NMike Frysinger <vapier.adi@gmail.com>
Signed-off-by: NBryan Wu <cooloney@kernel.org>
Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 a42e809a
...@@ -804,7 +804,7 @@ static void pump_transfers(unsigned long data) ...@@ -804,7 +804,7 @@ static void pump_transfers(unsigned long data)
if (bfin_addr_dcachable((unsigned long) drv_data->rx)) if (bfin_addr_dcachable((unsigned long) drv_data->rx))
invalidate_dcache_range((unsigned long) drv_data->rx, invalidate_dcache_range((unsigned long) drv_data->rx,
(unsigned long) (drv_data->rx + (unsigned long) (drv_data->rx +
drv_data->len)); drv_data->len_in_bytes));
/* clear tx reg soformer data is not shifted out */ /* clear tx reg soformer data is not shifted out */
write_TDBR(drv_data, 0xFFFF); write_TDBR(drv_data, 0xFFFF);
...@@ -830,7 +830,7 @@ static void pump_transfers(unsigned long data) ...@@ -830,7 +830,7 @@ static void pump_transfers(unsigned long data)
if (bfin_addr_dcachable((unsigned long) drv_data->tx)) if (bfin_addr_dcachable((unsigned long) drv_data->tx))
flush_dcache_range((unsigned long) drv_data->tx, flush_dcache_range((unsigned long) drv_data->tx,
(unsigned long) (drv_data->tx + (unsigned long) (drv_data->tx +
drv_data->len)); drv_data->len_in_bytes));
/* start dma */ /* start dma */
dma_enable_irq(drv_data->dma_channel); dma_enable_irq(drv_data->dma_channel);
...@@ -893,7 +893,7 @@ static void pump_transfers(unsigned long data) ...@@ -893,7 +893,7 @@ static void pump_transfers(unsigned long data)
message->state = ERROR_STATE; message->state = ERROR_STATE;
} else { } else {
/* Update total byte transfered */ /* Update total byte transfered */
message->actual_length += drv_data->len; message->actual_length += drv_data->len_in_bytes;
/* Move to next transfer of this msg */ /* Move to next transfer of this msg */
message->state = next_transfer(drv_data); message->state = next_transfer(drv_data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册