aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/dma/iovlock.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/drivers/dma/iovlock.c b/drivers/dma/iovlock.c
index d637555a833b..e763d723e4cf 100644
--- a/drivers/dma/iovlock.c
+++ b/drivers/dma/iovlock.c
@@ -143,29 +143,6 @@ void dma_unpin_iovec_pages(struct dma_pinned_list *pinned_list)
143 kfree(pinned_list); 143 kfree(pinned_list);
144} 144}
145 145
146static dma_cookie_t dma_memcpy_to_kernel_iovec(struct dma_chan *chan, struct
147 iovec *iov, unsigned char *kdata, size_t len)
148{
149 dma_cookie_t dma_cookie = 0;
150
151 while (len > 0) {
152 if (iov->iov_len) {
153 int copy = min_t(unsigned int, iov->iov_len, len);
154 dma_cookie = dma_async_memcpy_buf_to_buf(
155 chan,
156 iov->iov_base,
157 kdata,
158 copy);
159 kdata += copy;
160 len -= copy;
161 iov->iov_len -= copy;
162 iov->iov_base += copy;
163 }
164 iov++;
165 }
166
167 return dma_cookie;
168}
169 146
170/* 147/*
171 * We have already pinned down the pages we will be using in the iovecs. 148 * We have already pinned down the pages we will be using in the iovecs.
@@ -187,10 +164,6 @@ dma_cookie_t dma_memcpy_to_iovec(struct dma_chan *chan, struct iovec *iov,
187 if (!chan) 164 if (!chan)
188 return memcpy_toiovec(iov, kdata, len); 165 return memcpy_toiovec(iov, kdata, len);
189 166
190 /* -> kernel copies (e.g. smbfs) */
191 if (!pinned_list)
192 return dma_memcpy_to_kernel_iovec(chan, iov, kdata, len);
193
194 iovec_idx = 0; 167 iovec_idx = 0;
195 while (iovec_idx < pinned_list->nr_iovecs) { 168 while (iovec_idx < pinned_list->nr_iovecs) {
196 struct dma_page_list *page_list; 169 struct dma_page_list *page_list;