diff options
author | Sebastian Andrzej Siewior <sebastian@breakpoint.cc> | 2009-06-22 03:18:05 -0400 |
---|---|---|
committer | Pierre Ossman <pierre@ossman.eu> | 2009-07-31 06:28:46 -0400 |
commit | 4b2a108cd0d34880fe9d932258ca5b2ccebcd05e (patch) | |
tree | ce41850f6b9a738804cc8d811f74f3a09bc954f4 /include/linux/cb710.h | |
parent | da60a91d012bcb10bc5bcd86d585c4281742832c (diff) |
cb710: use SG_MITER_TO_SG/SG_MITER_FROM_SG
the code allready uses flush_kernel_dcache_page(). This patch updates the
driver to the recent sg API changes which require that either SG_MITER_TO_SG
or SG_MITER_FROM_SG is set. SG_MITER_TO_SG calls flush_kernel_dcache_page()
in sg_mitter_stop()
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Acked-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
Diffstat (limited to 'include/linux/cb710.h')
-rw-r--r-- | include/linux/cb710.h | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/include/linux/cb710.h b/include/linux/cb710.h index 63bc9a4d2926..8cc10411bab2 100644 --- a/include/linux/cb710.h +++ b/include/linux/cb710.h | |||
@@ -140,29 +140,6 @@ void cb710_dump_regs(struct cb710_chip *chip, unsigned dump); | |||
140 | #include <linux/highmem.h> | 140 | #include <linux/highmem.h> |
141 | #include <linux/scatterlist.h> | 141 | #include <linux/scatterlist.h> |
142 | 142 | ||
143 | /** | ||
144 | * cb710_sg_miter_stop_writing - stop mapping iteration after writing | ||
145 | * @miter: sg mapping iter to be stopped | ||
146 | * | ||
147 | * Description: | ||
148 | * Stops mapping iterator @miter. @miter should have been started | ||
149 | * started using sg_miter_start(). A stopped iteration can be | ||
150 | * resumed by calling sg_miter_next() on it. This is useful when | ||
151 | * resources (kmap) need to be released during iteration. | ||
152 | * | ||
153 | * This is a convenience wrapper that will be optimized out for arches | ||
154 | * that don't need flush_kernel_dcache_page(). | ||
155 | * | ||
156 | * Context: | ||
157 | * IRQ disabled if the SG_MITER_ATOMIC is set. Don't care otherwise. | ||
158 | */ | ||
159 | static inline void cb710_sg_miter_stop_writing(struct sg_mapping_iter *miter) | ||
160 | { | ||
161 | if (miter->page) | ||
162 | flush_kernel_dcache_page(miter->page); | ||
163 | sg_miter_stop(miter); | ||
164 | } | ||
165 | |||
166 | /* | 143 | /* |
167 | * 32-bit PIO mapping sg iterator | 144 | * 32-bit PIO mapping sg iterator |
168 | * | 145 | * |
@@ -171,12 +148,12 @@ static inline void cb710_sg_miter_stop_writing(struct sg_mapping_iter *miter) | |||
171 | * without DMA support). | 148 | * without DMA support). |
172 | * | 149 | * |
173 | * Best-case reading (transfer from device): | 150 | * Best-case reading (transfer from device): |
174 | * sg_miter_start(); | 151 | * sg_miter_start(, SG_MITER_TO_SG); |
175 | * cb710_sg_dwiter_write_from_io(); | 152 | * cb710_sg_dwiter_write_from_io(); |
176 | * cb710_sg_miter_stop_writing(); | 153 | * sg_miter_stop(); |
177 | * | 154 | * |
178 | * Best-case writing (transfer to device): | 155 | * Best-case writing (transfer to device): |
179 | * sg_miter_start(); | 156 | * sg_miter_start(, SG_MITER_FROM_SG); |
180 | * cb710_sg_dwiter_read_to_io(); | 157 | * cb710_sg_dwiter_read_to_io(); |
181 | * sg_miter_stop(); | 158 | * sg_miter_stop(); |
182 | */ | 159 | */ |