diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2009-08-09 22:53:12 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-10 03:34:58 -0400 |
commit | bc0a14f154069cc4e42ea903c2c2b9984a94e4b7 (patch) | |
tree | 85b1baa32fbb42d094c66b51ee3e576e77298d29 /arch/sparc/kernel/dma.c | |
parent | be02ff9940c0106dea1470462401a07c5d52e086 (diff) |
sparc: Use dma_map_ops struct
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Robert Reif <reif@earthlink.net>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: tony.luck@intel.com
Cc: fenghua.yu@intel.com
LKML-Reference: <1249872797-1314-4-git-send-email-fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/sparc/kernel/dma.c')
-rw-r--r-- | arch/sparc/kernel/dma.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/sparc/kernel/dma.c b/arch/sparc/kernel/dma.c index 524c32f97c55..473a3fc7ab5b 100644 --- a/arch/sparc/kernel/dma.c +++ b/arch/sparc/kernel/dma.c | |||
@@ -60,7 +60,8 @@ static void dma32_free_coherent(struct device *dev, size_t size, | |||
60 | 60 | ||
61 | static dma_addr_t dma32_map_page(struct device *dev, struct page *page, | 61 | static dma_addr_t dma32_map_page(struct device *dev, struct page *page, |
62 | unsigned long offset, size_t size, | 62 | unsigned long offset, size_t size, |
63 | enum dma_data_direction direction) | 63 | enum dma_data_direction direction, |
64 | struct dma_attrs *attrs) | ||
64 | { | 65 | { |
65 | #ifdef CONFIG_PCI | 66 | #ifdef CONFIG_PCI |
66 | if (dev->bus == &pci_bus_type) | 67 | if (dev->bus == &pci_bus_type) |
@@ -72,7 +73,8 @@ static dma_addr_t dma32_map_page(struct device *dev, struct page *page, | |||
72 | } | 73 | } |
73 | 74 | ||
74 | static void dma32_unmap_page(struct device *dev, dma_addr_t dma_address, | 75 | static void dma32_unmap_page(struct device *dev, dma_addr_t dma_address, |
75 | size_t size, enum dma_data_direction direction) | 76 | size_t size, enum dma_data_direction direction, |
77 | struct dma_attrs *attrs) | ||
76 | { | 78 | { |
77 | #ifdef CONFIG_PCI | 79 | #ifdef CONFIG_PCI |
78 | if (dev->bus == &pci_bus_type) { | 80 | if (dev->bus == &pci_bus_type) { |
@@ -85,7 +87,8 @@ static void dma32_unmap_page(struct device *dev, dma_addr_t dma_address, | |||
85 | } | 87 | } |
86 | 88 | ||
87 | static int dma32_map_sg(struct device *dev, struct scatterlist *sg, | 89 | static int dma32_map_sg(struct device *dev, struct scatterlist *sg, |
88 | int nents, enum dma_data_direction direction) | 90 | int nents, enum dma_data_direction direction, |
91 | struct dma_attrs *attrs) | ||
89 | { | 92 | { |
90 | #ifdef CONFIG_PCI | 93 | #ifdef CONFIG_PCI |
91 | if (dev->bus == &pci_bus_type) | 94 | if (dev->bus == &pci_bus_type) |
@@ -95,7 +98,8 @@ static int dma32_map_sg(struct device *dev, struct scatterlist *sg, | |||
95 | } | 98 | } |
96 | 99 | ||
97 | void dma32_unmap_sg(struct device *dev, struct scatterlist *sg, | 100 | void dma32_unmap_sg(struct device *dev, struct scatterlist *sg, |
98 | int nents, enum dma_data_direction direction) | 101 | int nents, enum dma_data_direction direction, |
102 | struct dma_attrs *attrs) | ||
99 | { | 103 | { |
100 | #ifdef CONFIG_PCI | 104 | #ifdef CONFIG_PCI |
101 | if (dev->bus == &pci_bus_type) { | 105 | if (dev->bus == &pci_bus_type) { |
@@ -161,7 +165,7 @@ static void dma32_sync_sg_for_device(struct device *dev, | |||
161 | BUG(); | 165 | BUG(); |
162 | } | 166 | } |
163 | 167 | ||
164 | static const struct dma_ops dma32_dma_ops = { | 168 | static const struct dma_map_ops dma32_dma_ops = { |
165 | .alloc_coherent = dma32_alloc_coherent, | 169 | .alloc_coherent = dma32_alloc_coherent, |
166 | .free_coherent = dma32_free_coherent, | 170 | .free_coherent = dma32_free_coherent, |
167 | .map_page = dma32_map_page, | 171 | .map_page = dma32_map_page, |
@@ -174,5 +178,5 @@ static const struct dma_ops dma32_dma_ops = { | |||
174 | .sync_sg_for_device = dma32_sync_sg_for_device, | 178 | .sync_sg_for_device = dma32_sync_sg_for_device, |
175 | }; | 179 | }; |
176 | 180 | ||
177 | const struct dma_ops *dma_ops = &dma32_dma_ops; | 181 | const struct dma_map_ops *dma_ops = &dma32_dma_ops; |
178 | EXPORT_SYMBOL(dma_ops); | 182 | EXPORT_SYMBOL(dma_ops); |