diff options
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/atmel_spi.c | 4 | ||||
-rw-r--r-- | drivers/spi/au1550_spi.c | 6 | ||||
-rw-r--r-- | drivers/spi/omap2_mcspi.c | 4 | ||||
-rw-r--r-- | drivers/spi/pxa2xx_spi.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi_imx.c | 6 |
5 files changed, 12 insertions, 12 deletions
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index e81d59d78910..0c7165660853 100644 --- a/drivers/spi/atmel_spi.c +++ b/drivers/spi/atmel_spi.c | |||
@@ -313,14 +313,14 @@ atmel_spi_dma_map_xfer(struct atmel_spi *as, struct spi_transfer *xfer) | |||
313 | xfer->tx_dma = dma_map_single(dev, | 313 | xfer->tx_dma = dma_map_single(dev, |
314 | (void *) xfer->tx_buf, xfer->len, | 314 | (void *) xfer->tx_buf, xfer->len, |
315 | DMA_TO_DEVICE); | 315 | DMA_TO_DEVICE); |
316 | if (dma_mapping_error(xfer->tx_dma)) | 316 | if (dma_mapping_error(dev, xfer->tx_dma)) |
317 | return -ENOMEM; | 317 | return -ENOMEM; |
318 | } | 318 | } |
319 | if (xfer->rx_buf) { | 319 | if (xfer->rx_buf) { |
320 | xfer->rx_dma = dma_map_single(dev, | 320 | xfer->rx_dma = dma_map_single(dev, |
321 | xfer->rx_buf, xfer->len, | 321 | xfer->rx_buf, xfer->len, |
322 | DMA_FROM_DEVICE); | 322 | DMA_FROM_DEVICE); |
323 | if (dma_mapping_error(xfer->rx_dma)) { | 323 | if (dma_mapping_error(dev, xfer->rx_dma)) { |
324 | if (xfer->tx_buf) | 324 | if (xfer->tx_buf) |
325 | dma_unmap_single(dev, | 325 | dma_unmap_single(dev, |
326 | xfer->tx_dma, xfer->len, | 326 | xfer->tx_dma, xfer->len, |
diff --git a/drivers/spi/au1550_spi.c b/drivers/spi/au1550_spi.c index 9149689c79d9..87b73e0169c5 100644 --- a/drivers/spi/au1550_spi.c +++ b/drivers/spi/au1550_spi.c | |||
@@ -334,7 +334,7 @@ static int au1550_spi_dma_rxtmp_alloc(struct au1550_spi *hw, unsigned size) | |||
334 | hw->dma_rx_tmpbuf_size = size; | 334 | hw->dma_rx_tmpbuf_size = size; |
335 | hw->dma_rx_tmpbuf_addr = dma_map_single(hw->dev, hw->dma_rx_tmpbuf, | 335 | hw->dma_rx_tmpbuf_addr = dma_map_single(hw->dev, hw->dma_rx_tmpbuf, |
336 | size, DMA_FROM_DEVICE); | 336 | size, DMA_FROM_DEVICE); |
337 | if (dma_mapping_error(hw->dma_rx_tmpbuf_addr)) { | 337 | if (dma_mapping_error(hw->dev, hw->dma_rx_tmpbuf_addr)) { |
338 | kfree(hw->dma_rx_tmpbuf); | 338 | kfree(hw->dma_rx_tmpbuf); |
339 | hw->dma_rx_tmpbuf = 0; | 339 | hw->dma_rx_tmpbuf = 0; |
340 | hw->dma_rx_tmpbuf_size = 0; | 340 | hw->dma_rx_tmpbuf_size = 0; |
@@ -378,7 +378,7 @@ static int au1550_spi_dma_txrxb(struct spi_device *spi, struct spi_transfer *t) | |||
378 | dma_rx_addr = dma_map_single(hw->dev, | 378 | dma_rx_addr = dma_map_single(hw->dev, |
379 | (void *)t->rx_buf, | 379 | (void *)t->rx_buf, |
380 | t->len, DMA_FROM_DEVICE); | 380 | t->len, DMA_FROM_DEVICE); |
381 | if (dma_mapping_error(dma_rx_addr)) | 381 | if (dma_mapping_error(hw->dev, dma_rx_addr)) |
382 | dev_err(hw->dev, "rx dma map error\n"); | 382 | dev_err(hw->dev, "rx dma map error\n"); |
383 | } | 383 | } |
384 | } else { | 384 | } else { |
@@ -401,7 +401,7 @@ static int au1550_spi_dma_txrxb(struct spi_device *spi, struct spi_transfer *t) | |||
401 | dma_tx_addr = dma_map_single(hw->dev, | 401 | dma_tx_addr = dma_map_single(hw->dev, |
402 | (void *)t->tx_buf, | 402 | (void *)t->tx_buf, |
403 | t->len, DMA_TO_DEVICE); | 403 | t->len, DMA_TO_DEVICE); |
404 | if (dma_mapping_error(dma_tx_addr)) | 404 | if (dma_mapping_error(hw->dev, dma_tx_addr)) |
405 | dev_err(hw->dev, "tx dma map error\n"); | 405 | dev_err(hw->dev, "tx dma map error\n"); |
406 | } | 406 | } |
407 | } else { | 407 | } else { |
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c index b1cc148036c1..f6f987bb71ca 100644 --- a/drivers/spi/omap2_mcspi.c +++ b/drivers/spi/omap2_mcspi.c | |||
@@ -836,7 +836,7 @@ static int omap2_mcspi_transfer(struct spi_device *spi, struct spi_message *m) | |||
836 | if (tx_buf != NULL) { | 836 | if (tx_buf != NULL) { |
837 | t->tx_dma = dma_map_single(&spi->dev, (void *) tx_buf, | 837 | t->tx_dma = dma_map_single(&spi->dev, (void *) tx_buf, |
838 | len, DMA_TO_DEVICE); | 838 | len, DMA_TO_DEVICE); |
839 | if (dma_mapping_error(t->tx_dma)) { | 839 | if (dma_mapping_error(&spi->dev, t->tx_dma)) { |
840 | dev_dbg(&spi->dev, "dma %cX %d bytes error\n", | 840 | dev_dbg(&spi->dev, "dma %cX %d bytes error\n", |
841 | 'T', len); | 841 | 'T', len); |
842 | return -EINVAL; | 842 | return -EINVAL; |
@@ -845,7 +845,7 @@ static int omap2_mcspi_transfer(struct spi_device *spi, struct spi_message *m) | |||
845 | if (rx_buf != NULL) { | 845 | if (rx_buf != NULL) { |
846 | t->rx_dma = dma_map_single(&spi->dev, rx_buf, t->len, | 846 | t->rx_dma = dma_map_single(&spi->dev, rx_buf, t->len, |
847 | DMA_FROM_DEVICE); | 847 | DMA_FROM_DEVICE); |
848 | if (dma_mapping_error(t->rx_dma)) { | 848 | if (dma_mapping_error(&spi->dev, t->rx_dma)) { |
849 | dev_dbg(&spi->dev, "dma %cX %d bytes error\n", | 849 | dev_dbg(&spi->dev, "dma %cX %d bytes error\n", |
850 | 'R', len); | 850 | 'R', len); |
851 | if (tx_buf != NULL) | 851 | if (tx_buf != NULL) |
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c index 0c452c46ab07..067299d6d192 100644 --- a/drivers/spi/pxa2xx_spi.c +++ b/drivers/spi/pxa2xx_spi.c | |||
@@ -353,7 +353,7 @@ static int map_dma_buffers(struct driver_data *drv_data) | |||
353 | drv_data->rx_dma = dma_map_single(dev, drv_data->rx, | 353 | drv_data->rx_dma = dma_map_single(dev, drv_data->rx, |
354 | drv_data->rx_map_len, | 354 | drv_data->rx_map_len, |
355 | DMA_FROM_DEVICE); | 355 | DMA_FROM_DEVICE); |
356 | if (dma_mapping_error(drv_data->rx_dma)) | 356 | if (dma_mapping_error(dev, drv_data->rx_dma)) |
357 | return 0; | 357 | return 0; |
358 | 358 | ||
359 | /* Stream map the tx buffer */ | 359 | /* Stream map the tx buffer */ |
@@ -361,7 +361,7 @@ static int map_dma_buffers(struct driver_data *drv_data) | |||
361 | drv_data->tx_map_len, | 361 | drv_data->tx_map_len, |
362 | DMA_TO_DEVICE); | 362 | DMA_TO_DEVICE); |
363 | 363 | ||
364 | if (dma_mapping_error(drv_data->tx_dma)) { | 364 | if (dma_mapping_error(dev, drv_data->tx_dma)) { |
365 | dma_unmap_single(dev, drv_data->rx_dma, | 365 | dma_unmap_single(dev, drv_data->rx_dma, |
366 | drv_data->rx_map_len, DMA_FROM_DEVICE); | 366 | drv_data->rx_map_len, DMA_FROM_DEVICE); |
367 | return 0; | 367 | return 0; |
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index 54ac7bea5f8c..6fb77fcc4971 100644 --- a/drivers/spi/spi_imx.c +++ b/drivers/spi/spi_imx.c | |||
@@ -491,7 +491,7 @@ static int map_dma_buffers(struct driver_data *drv_data) | |||
491 | buf, | 491 | buf, |
492 | drv_data->tx_map_len, | 492 | drv_data->tx_map_len, |
493 | DMA_TO_DEVICE); | 493 | DMA_TO_DEVICE); |
494 | if (dma_mapping_error(drv_data->tx_dma)) | 494 | if (dma_mapping_error(dev, drv_data->tx_dma)) |
495 | return -1; | 495 | return -1; |
496 | 496 | ||
497 | drv_data->tx_dma_needs_unmap = 1; | 497 | drv_data->tx_dma_needs_unmap = 1; |
@@ -516,7 +516,7 @@ static int map_dma_buffers(struct driver_data *drv_data) | |||
516 | buf, | 516 | buf, |
517 | drv_data->len, | 517 | drv_data->len, |
518 | DMA_FROM_DEVICE); | 518 | DMA_FROM_DEVICE); |
519 | if (dma_mapping_error(drv_data->rx_dma)) | 519 | if (dma_mapping_error(dev, drv_data->rx_dma)) |
520 | return -1; | 520 | return -1; |
521 | drv_data->rx_dma_needs_unmap = 1; | 521 | drv_data->rx_dma_needs_unmap = 1; |
522 | } | 522 | } |
@@ -534,7 +534,7 @@ static int map_dma_buffers(struct driver_data *drv_data) | |||
534 | buf, | 534 | buf, |
535 | drv_data->tx_map_len, | 535 | drv_data->tx_map_len, |
536 | DMA_TO_DEVICE); | 536 | DMA_TO_DEVICE); |
537 | if (dma_mapping_error(drv_data->tx_dma)) { | 537 | if (dma_mapping_error(dev, drv_data->tx_dma)) { |
538 | if (drv_data->rx_dma) { | 538 | if (drv_data->rx_dma) { |
539 | dma_unmap_single(dev, | 539 | dma_unmap_single(dev, |
540 | drv_data->rx_dma, | 540 | drv_data->rx_dma, |