diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2012-11-15 09:36:37 -0500 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2012-11-20 09:59:00 -0500 |
commit | 9aedbdbab39c8aa58c0b2a0791fb10df6eebc123 (patch) | |
tree | ad8a80c2cdfbc891203dcbccd529e1be08fbbbae | |
parent | c819ce177eb4dc796996618c1d53856cad1201ec (diff) |
dma: mv_xor: remove hw_id field from platform_data
There is no need for the platform_data to give this ID, it is simply
the channel number, so we can compute it inside the driver when
registering the channels.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-rw-r--r-- | arch/arm/plat-orion/common.c | 4 | ||||
-rw-r--r-- | drivers/dma/mv_xor.c | 6 | ||||
-rw-r--r-- | include/linux/platform_data/dma-mv_xor.h | 1 |
3 files changed, 3 insertions, 8 deletions
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 31517cef8c4d..09d836060bf4 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c | |||
@@ -627,11 +627,9 @@ static struct resource orion_xor0_shared_resources[] = { | |||
627 | 627 | ||
628 | static struct mv_xor_channel_data orion_xor0_channels_data[2] = { | 628 | static struct mv_xor_channel_data orion_xor0_channels_data[2] = { |
629 | { | 629 | { |
630 | .hw_id = 0, | ||
631 | .pool_size = PAGE_SIZE, | 630 | .pool_size = PAGE_SIZE, |
632 | }, | 631 | }, |
633 | { | 632 | { |
634 | .hw_id = 1, | ||
635 | .pool_size = PAGE_SIZE, | 633 | .pool_size = PAGE_SIZE, |
636 | }, | 634 | }, |
637 | }; | 635 | }; |
@@ -702,11 +700,9 @@ static struct resource orion_xor1_shared_resources[] = { | |||
702 | 700 | ||
703 | static struct mv_xor_channel_data orion_xor1_channels_data[2] = { | 701 | static struct mv_xor_channel_data orion_xor1_channels_data[2] = { |
704 | { | 702 | { |
705 | .hw_id = 0, | ||
706 | .pool_size = PAGE_SIZE, | 703 | .pool_size = PAGE_SIZE, |
707 | }, | 704 | }, |
708 | { | 705 | { |
709 | .hw_id = 1, | ||
710 | .pool_size = PAGE_SIZE, | 706 | .pool_size = PAGE_SIZE, |
711 | }, | 707 | }, |
712 | }; | 708 | }; |
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index a6a5a28574c4..fc983bf38438 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c | |||
@@ -1088,7 +1088,7 @@ static int mv_xor_channel_remove(struct mv_xor_chan *mv_chan) | |||
1088 | static struct mv_xor_chan * | 1088 | static struct mv_xor_chan * |
1089 | mv_xor_channel_add(struct mv_xor_device *xordev, | 1089 | mv_xor_channel_add(struct mv_xor_device *xordev, |
1090 | struct platform_device *pdev, | 1090 | struct platform_device *pdev, |
1091 | int hw_id, dma_cap_mask_t cap_mask, | 1091 | int idx, dma_cap_mask_t cap_mask, |
1092 | size_t pool_size, int irq) | 1092 | size_t pool_size, int irq) |
1093 | { | 1093 | { |
1094 | int ret = 0; | 1094 | int ret = 0; |
@@ -1101,7 +1101,7 @@ mv_xor_channel_add(struct mv_xor_device *xordev, | |||
1101 | goto err_free_dma; | 1101 | goto err_free_dma; |
1102 | } | 1102 | } |
1103 | 1103 | ||
1104 | mv_chan->idx = hw_id; | 1104 | mv_chan->idx = idx; |
1105 | 1105 | ||
1106 | dma_dev = &mv_chan->dmadev; | 1106 | dma_dev = &mv_chan->dmadev; |
1107 | 1107 | ||
@@ -1295,7 +1295,7 @@ static int mv_xor_probe(struct platform_device *pdev) | |||
1295 | } | 1295 | } |
1296 | 1296 | ||
1297 | xordev->channels[i] = | 1297 | xordev->channels[i] = |
1298 | mv_xor_channel_add(xordev, pdev, cd->hw_id, | 1298 | mv_xor_channel_add(xordev, pdev, i, |
1299 | cd->cap_mask, | 1299 | cd->cap_mask, |
1300 | cd->pool_size, irq); | 1300 | cd->pool_size, irq); |
1301 | if (IS_ERR(xordev->channels[i])) { | 1301 | if (IS_ERR(xordev->channels[i])) { |
diff --git a/include/linux/platform_data/dma-mv_xor.h b/include/linux/platform_data/dma-mv_xor.h index 367bb216c4a7..b18dc2496186 100644 --- a/include/linux/platform_data/dma-mv_xor.h +++ b/include/linux/platform_data/dma-mv_xor.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #define MV_XOR_NAME "mv_xor" | 13 | #define MV_XOR_NAME "mv_xor" |
14 | 14 | ||
15 | struct mv_xor_channel_data { | 15 | struct mv_xor_channel_data { |
16 | int hw_id; | ||
17 | dma_cap_mask_t cap_mask; | 16 | dma_cap_mask_t cap_mask; |
18 | size_t pool_size; | 17 | size_t pool_size; |
19 | }; | 18 | }; |