diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2012-11-15 09:00:25 -0500 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2012-11-20 09:58:59 -0500 |
commit | 8c75979d7ac8cdec927605336aeebea0c7f88f74 (patch) | |
tree | a8189afecee0372448a92e379c270574996f9354 /drivers/dma | |
parent | 98817b99599fc18b5e4bf5bc63ad899b83404a68 (diff) |
dma: mv_xor: in mv_xor_device, rename 'common' to 'dmadev'
The mv_xor_device structure embeds a 'struct dma_device', which is
named 'common', a not very meaningful name. Rename it to 'dmadev',
which will help avoid confusions later as we merge the mv_xor_device
and mv_xor_chan structures together.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/mv_xor.c | 14 | ||||
-rw-r--r-- | drivers/dma/mv_xor.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index 491f506b798b..a64e30e27a19 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c | |||
@@ -40,7 +40,7 @@ static void mv_xor_issue_pending(struct dma_chan *chan); | |||
40 | container_of(tx, struct mv_xor_desc_slot, async_tx) | 40 | container_of(tx, struct mv_xor_desc_slot, async_tx) |
41 | 41 | ||
42 | #define mv_chan_to_devp(chan) \ | 42 | #define mv_chan_to_devp(chan) \ |
43 | ((chan)->device->common.dev) | 43 | ((chan)->device->dmadev.dev) |
44 | 44 | ||
45 | static void mv_desc_init(struct mv_xor_desc_slot *desc, unsigned long flags) | 45 | static void mv_desc_init(struct mv_xor_desc_slot *desc, unsigned long flags) |
46 | { | 46 | { |
@@ -923,7 +923,7 @@ static int __devinit mv_xor_memcpy_self_test(struct mv_xor_device *device) | |||
923 | ((u8 *) src)[i] = (u8)i; | 923 | ((u8 *) src)[i] = (u8)i; |
924 | 924 | ||
925 | /* Start copy, using first DMA channel */ | 925 | /* Start copy, using first DMA channel */ |
926 | dma_chan = container_of(device->common.channels.next, | 926 | dma_chan = container_of(device->dmadev.channels.next, |
927 | struct dma_chan, | 927 | struct dma_chan, |
928 | device_node); | 928 | device_node); |
929 | if (mv_xor_alloc_chan_resources(dma_chan) < 1) { | 929 | if (mv_xor_alloc_chan_resources(dma_chan) < 1) { |
@@ -1016,7 +1016,7 @@ mv_xor_xor_self_test(struct mv_xor_device *device) | |||
1016 | 1016 | ||
1017 | memset(page_address(dest), 0, PAGE_SIZE); | 1017 | memset(page_address(dest), 0, PAGE_SIZE); |
1018 | 1018 | ||
1019 | dma_chan = container_of(device->common.channels.next, | 1019 | dma_chan = container_of(device->dmadev.channels.next, |
1020 | struct dma_chan, | 1020 | struct dma_chan, |
1021 | device_node); | 1021 | device_node); |
1022 | if (mv_xor_alloc_chan_resources(dma_chan) < 1) { | 1022 | if (mv_xor_alloc_chan_resources(dma_chan) < 1) { |
@@ -1076,14 +1076,14 @@ static int mv_xor_channel_remove(struct mv_xor_device *device) | |||
1076 | { | 1076 | { |
1077 | struct dma_chan *chan, *_chan; | 1077 | struct dma_chan *chan, *_chan; |
1078 | struct mv_xor_chan *mv_chan; | 1078 | struct mv_xor_chan *mv_chan; |
1079 | struct device *dev = device->common.dev; | 1079 | struct device *dev = device->dmadev.dev; |
1080 | 1080 | ||
1081 | dma_async_device_unregister(&device->common); | 1081 | dma_async_device_unregister(&device->dmadev); |
1082 | 1082 | ||
1083 | dma_free_coherent(dev, device->pool_size, | 1083 | dma_free_coherent(dev, device->pool_size, |
1084 | device->dma_desc_pool_virt, device->dma_desc_pool); | 1084 | device->dma_desc_pool_virt, device->dma_desc_pool); |
1085 | 1085 | ||
1086 | list_for_each_entry_safe(chan, _chan, &device->common.channels, | 1086 | list_for_each_entry_safe(chan, _chan, &device->dmadev.channels, |
1087 | device_node) { | 1087 | device_node) { |
1088 | mv_chan = to_mv_xor_chan(chan); | 1088 | mv_chan = to_mv_xor_chan(chan); |
1089 | list_del(&chan->device_node); | 1089 | list_del(&chan->device_node); |
@@ -1107,7 +1107,7 @@ mv_xor_channel_add(struct mv_xor_private *msp, | |||
1107 | if (!adev) | 1107 | if (!adev) |
1108 | return ERR_PTR(-ENOMEM); | 1108 | return ERR_PTR(-ENOMEM); |
1109 | 1109 | ||
1110 | dma_dev = &adev->common; | 1110 | dma_dev = &adev->dmadev; |
1111 | 1111 | ||
1112 | /* allocate coherent memory for hardware descriptors | 1112 | /* allocate coherent memory for hardware descriptors |
1113 | * note: writecombine gives slightly better performance, but | 1113 | * note: writecombine gives slightly better performance, but |
diff --git a/drivers/dma/mv_xor.h b/drivers/dma/mv_xor.h index ad18f6447cec..84255e699830 100644 --- a/drivers/dma/mv_xor.h +++ b/drivers/dma/mv_xor.h | |||
@@ -73,7 +73,7 @@ struct mv_xor_device { | |||
73 | dma_addr_t dma_desc_pool; | 73 | dma_addr_t dma_desc_pool; |
74 | void *dma_desc_pool_virt; | 74 | void *dma_desc_pool_virt; |
75 | size_t pool_size; | 75 | size_t pool_size; |
76 | struct dma_device common; | 76 | struct dma_device dmadev; |
77 | struct mv_xor_private *shared; | 77 | struct mv_xor_private *shared; |
78 | }; | 78 | }; |
79 | 79 | ||