diff options
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/pata_arasan_cf.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c index 8b060c44bbe1..65cee74605b4 100644 --- a/drivers/ata/pata_arasan_cf.c +++ b/drivers/ata/pata_arasan_cf.c | |||
@@ -210,6 +210,8 @@ struct arasan_cf_dev { | |||
210 | struct dma_chan *dma_chan; | 210 | struct dma_chan *dma_chan; |
211 | /* Mask for DMA transfers */ | 211 | /* Mask for DMA transfers */ |
212 | dma_cap_mask_t mask; | 212 | dma_cap_mask_t mask; |
213 | /* dma channel private data */ | ||
214 | void *dma_priv; | ||
213 | /* DMA transfer work */ | 215 | /* DMA transfer work */ |
214 | struct work_struct work; | 216 | struct work_struct work; |
215 | /* DMA delayed finish work */ | 217 | /* DMA delayed finish work */ |
@@ -356,6 +358,7 @@ static void dma_callback(void *dev) | |||
356 | 358 | ||
357 | static bool filter(struct dma_chan *chan, void *slave) | 359 | static bool filter(struct dma_chan *chan, void *slave) |
358 | { | 360 | { |
361 | chan->private = slave; | ||
359 | return true; | 362 | return true; |
360 | } | 363 | } |
361 | 364 | ||
@@ -526,7 +529,8 @@ static void data_xfer(struct work_struct *work) | |||
526 | 529 | ||
527 | /* request dma channels */ | 530 | /* request dma channels */ |
528 | /* dma_request_channel may sleep, so calling from process context */ | 531 | /* dma_request_channel may sleep, so calling from process context */ |
529 | acdev->dma_chan = dma_request_channel(acdev->mask, filter, NULL); | 532 | acdev->dma_chan = dma_request_channel(acdev->mask, filter, |
533 | acdev->dma_priv); | ||
530 | if (!acdev->dma_chan) { | 534 | if (!acdev->dma_chan) { |
531 | dev_err(acdev->host->dev, "Unable to get dma_chan\n"); | 535 | dev_err(acdev->host->dev, "Unable to get dma_chan\n"); |
532 | goto chan_request_fail; | 536 | goto chan_request_fail; |
@@ -853,6 +857,7 @@ static int __devinit arasan_cf_probe(struct platform_device *pdev) | |||
853 | INIT_WORK(&acdev->work, data_xfer); | 857 | INIT_WORK(&acdev->work, data_xfer); |
854 | INIT_DELAYED_WORK(&acdev->dwork, delayed_finish); | 858 | INIT_DELAYED_WORK(&acdev->dwork, delayed_finish); |
855 | dma_cap_set(DMA_MEMCPY, acdev->mask); | 859 | dma_cap_set(DMA_MEMCPY, acdev->mask); |
860 | acdev->dma_priv = pdata->dma_priv; | ||
856 | 861 | ||
857 | /* Handle platform specific quirks */ | 862 | /* Handle platform specific quirks */ |
858 | if (pdata->quirk) { | 863 | if (pdata->quirk) { |