2013-03-19 07:47:54

by Wenyou Yang

[permalink] [raw]
Subject: [PATCH v7 04/14] spi/spi-atmel: call unmapping on transfers buffers

From: Nicolas Ferre <[email protected]>

Signed-off-by: Nicolas Ferre <[email protected]>
Cc: [email protected]
Cc: [email protected]
[[email protected]: submit the patch]
Signed-off-by: Wenyou Yang <[email protected]>
---
drivers/spi/spi-atmel.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index f3e1cd8..e3af244 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -1049,6 +1049,7 @@ static int atmel_spi_remove(struct platform_device *pdev)
struct spi_master *master = platform_get_drvdata(pdev);
struct atmel_spi *as = spi_master_get_devdata(master);
struct spi_message *msg;
+ struct spi_transfer *xfer;

/* reset the hardware and block queue progress */
spin_lock_irq(&as->lock);
@@ -1060,9 +1061,10 @@ static int atmel_spi_remove(struct platform_device *pdev)

/* Terminate remaining queued transfers */
list_for_each_entry(msg, &as->queue, queue) {
- /* REVISIT unmapping the dma is a NOP on ARM and AVR32
- * but we shouldn't depend on that...
- */
+ list_for_each_entry(xfer, &msg->transfers, transfer_list) {
+ if (!msg->is_dma_mapped)
+ atmel_spi_dma_unmap_xfer(master, xfer);
+ }
msg->status = -ESHUTDOWN;
msg->complete(msg->context);
}
--
1.7.9.5


2013-04-01 13:43:04

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v7 04/14] spi/spi-atmel: call unmapping on transfers buffers

On Tue, Mar 19, 2013 at 03:44:22PM +0800, Wenyou Yang wrote:
> From: Nicolas Ferre <[email protected]>

Applied, thanks.


Attachments:
(No filename) (127.00 B)
signature.asc (836.00 B)
Digital signature
Download all attachments