From 1a2ea52d626e071140b02491af35b86d51ef4007 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 29 Oct 2012 16:27:34 +0100 Subject: [PATCH] --- yaml --- r: 344259 b: refs/heads/master c: 09f2b7864ce37483f4c4ecb30b0eed599f475035 h: refs/heads/master i: 344257: f707c2784585723293b95cf70844223ee6aded3d 344255: 67f3fc53705d2c3ea3f314174429b85dfe46304d v: v3 --- [refs] | 2 +- trunk/drivers/dma/mv_xor.c | 10 ++++------ trunk/drivers/dma/mv_xor.h | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 9ea5a580184d..4c55598ae5df 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a3fc74bc9bd8ffd1f2352a2053e906d1efad870d +refs/heads/master: 09f2b7864ce37483f4c4ecb30b0eed599f475035 diff --git a/trunk/drivers/dma/mv_xor.c b/trunk/drivers/dma/mv_xor.c index 610d0b886cd6..704277259a5b 100644 --- a/trunk/drivers/dma/mv_xor.c +++ b/trunk/drivers/dma/mv_xor.c @@ -604,9 +604,7 @@ static int mv_xor_alloc_chan_resources(struct dma_chan *chan) int idx; struct mv_xor_chan *mv_chan = to_mv_xor_chan(chan); struct mv_xor_desc_slot *slot = NULL; - struct mv_xor_platform_data *plat_data = - mv_chan->device->pdev->dev.platform_data; - int num_descs_in_pool = plat_data->pool_size/MV_XOR_SLOT_SIZE; + int num_descs_in_pool = mv_chan->device->pool_size/MV_XOR_SLOT_SIZE; /* Allocate descriptor slots */ idx = mv_chan->slots_allocated; @@ -1084,11 +1082,10 @@ static int __devexit mv_xor_remove(struct platform_device *dev) struct mv_xor_device *device = platform_get_drvdata(dev); struct dma_chan *chan, *_chan; struct mv_xor_chan *mv_chan; - struct mv_xor_platform_data *plat_data = dev->dev.platform_data; dma_async_device_unregister(&device->common); - dma_free_coherent(&dev->dev, plat_data->pool_size, + dma_free_coherent(&dev->dev, device->pool_size, device->dma_desc_pool_virt, device->dma_desc_pool); list_for_each_entry_safe(chan, _chan, &device->common.channels, @@ -1120,8 +1117,9 @@ static int __devinit mv_xor_probe(struct platform_device *pdev) * note: writecombine gives slightly better performance, but * requires that we explicitly flush the writes */ + adev->pool_size = plat_data->pool_size; adev->dma_desc_pool_virt = dma_alloc_writecombine(&pdev->dev, - plat_data->pool_size, + adev->pool_size, &adev->dma_desc_pool, GFP_KERNEL); if (!adev->dma_desc_pool_virt) diff --git a/trunk/drivers/dma/mv_xor.h b/trunk/drivers/dma/mv_xor.h index a5b422f5a8ab..a0641aebbdef 100644 --- a/trunk/drivers/dma/mv_xor.h +++ b/trunk/drivers/dma/mv_xor.h @@ -72,6 +72,7 @@ struct mv_xor_device { int id; dma_addr_t dma_desc_pool; void *dma_desc_pool_virt; + size_t pool_size; struct dma_device common; struct mv_xor_shared_private *shared; };