Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 198408
b: refs/heads/master
c: 99f1a43
h: refs/heads/master
v: v3
  • Loading branch information
Scott Ellis authored and Grant Likely committed May 25, 2010
1 parent 4873f97 commit 043a5a3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4743a0f88c4000dfa3c422ecc4d750d3a3410550
refs/heads/master: 99f1a43f436a6a92d15bddfeb65f3a920c8b88d3
19 changes: 11 additions & 8 deletions trunk/drivers/spi/omap2_mcspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,6 @@ static void omap2_mcspi_cleanup(struct spi_device *spi)
struct omap2_mcspi_cs *cs;

mcspi = spi_master_get_devdata(spi->master);
mcspi_dma = &mcspi->dma_channels[spi->chip_select];

if (spi->controller_state) {
/* Unlink controller state from context save list */
Expand All @@ -844,13 +843,17 @@ static void omap2_mcspi_cleanup(struct spi_device *spi)
kfree(spi->controller_state);
}

if (mcspi_dma->dma_rx_channel != -1) {
omap_free_dma(mcspi_dma->dma_rx_channel);
mcspi_dma->dma_rx_channel = -1;
}
if (mcspi_dma->dma_tx_channel != -1) {
omap_free_dma(mcspi_dma->dma_tx_channel);
mcspi_dma->dma_tx_channel = -1;
if (spi->chip_select < spi->master->num_chipselect) {
mcspi_dma = &mcspi->dma_channels[spi->chip_select];

if (mcspi_dma->dma_rx_channel != -1) {
omap_free_dma(mcspi_dma->dma_rx_channel);
mcspi_dma->dma_rx_channel = -1;
}
if (mcspi_dma->dma_tx_channel != -1) {
omap_free_dma(mcspi_dma->dma_tx_channel);
mcspi_dma->dma_tx_channel = -1;
}
}
}

Expand Down

0 comments on commit 043a5a3

Please sign in to comment.