Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212293
b: refs/heads/master
c: e02ddd4
h: refs/heads/master
i:
  212291: aa647fb
v: v3
  • Loading branch information
Jassi Brar authored and Grant Likely committed Sep 29, 2010
1 parent 19edde7 commit dd35096
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4a4fd47155ac49b62de5177a780c245e967752f3
refs/heads/master: e02ddd442a532c73e547ae3735c8012e3bd719a5
8 changes: 8 additions & 0 deletions trunk/drivers/spi/spi_s3c64xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@ static void s3c64xx_spi_dma_txcb(struct s3c2410_dma_chan *chan, void *buf_id,
static int s3c64xx_spi_map_mssg(struct s3c64xx_spi_driver_data *sdd,
struct spi_message *msg)
{
struct s3c64xx_spi_info *sci = sdd->cntrlr_info;
struct device *dev = &sdd->pdev->dev;
struct spi_transfer *xfer;

Expand All @@ -514,6 +515,9 @@ static int s3c64xx_spi_map_mssg(struct s3c64xx_spi_driver_data *sdd,
/* Map until end or first fail */
list_for_each_entry(xfer, &msg->transfers, transfer_list) {

if (xfer->len <= ((sci->fifo_lvl_mask >> 1) + 1))
continue;

if (xfer->tx_buf != NULL) {
xfer->tx_dma = dma_map_single(dev,
(void *)xfer->tx_buf, xfer->len,
Expand Down Expand Up @@ -545,6 +549,7 @@ static int s3c64xx_spi_map_mssg(struct s3c64xx_spi_driver_data *sdd,
static void s3c64xx_spi_unmap_mssg(struct s3c64xx_spi_driver_data *sdd,
struct spi_message *msg)
{
struct s3c64xx_spi_info *sci = sdd->cntrlr_info;
struct device *dev = &sdd->pdev->dev;
struct spi_transfer *xfer;

Expand All @@ -553,6 +558,9 @@ static void s3c64xx_spi_unmap_mssg(struct s3c64xx_spi_driver_data *sdd,

list_for_each_entry(xfer, &msg->transfers, transfer_list) {

if (xfer->len <= ((sci->fifo_lvl_mask >> 1) + 1))
continue;

if (xfer->rx_buf != NULL
&& xfer->rx_dma != XFER_DMAADDR_INVALID)
dma_unmap_single(dev, xfer->rx_dma,
Expand Down

0 comments on commit dd35096

Please sign in to comment.