aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/mon/mon_bin.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/mon/mon_bin.c')
-rw-r--r--drivers/usb/mon/mon_bin.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c
index 0f7a30b7d2d1..dfdc43e2e00d 100644
--- a/drivers/usb/mon/mon_bin.c
+++ b/drivers/usb/mon/mon_bin.c
@@ -220,9 +220,8 @@ static void mon_free_buff(struct mon_pgmap *map, int npages);
220 220
221/* 221/*
222 * This is a "chunked memcpy". It does not manipulate any counters. 222 * This is a "chunked memcpy". It does not manipulate any counters.
223 * But it returns the new offset for repeated application.
224 */ 223 */
225unsigned int mon_copy_to_buff(const struct mon_reader_bin *this, 224static void mon_copy_to_buff(const struct mon_reader_bin *this,
226 unsigned int off, const unsigned char *from, unsigned int length) 225 unsigned int off, const unsigned char *from, unsigned int length)
227{ 226{
228 unsigned int step_len; 227 unsigned int step_len;
@@ -247,7 +246,6 @@ unsigned int mon_copy_to_buff(const struct mon_reader_bin *this,
247 from += step_len; 246 from += step_len;
248 length -= step_len; 247 length -= step_len;
249 } 248 }
250 return off;
251} 249}
252 250
253/* 251/*
@@ -400,15 +398,8 @@ static char mon_bin_get_data(const struct mon_reader_bin *rp,
400 unsigned int offset, struct urb *urb, unsigned int length) 398 unsigned int offset, struct urb *urb, unsigned int length)
401{ 399{
402 400
403 if (urb->dev->bus->uses_dma &&
404 (urb->transfer_flags & URB_NO_TRANSFER_DMA_MAP)) {
405 mon_dmapeek_vec(rp, offset, urb->transfer_dma, length);
406 return 0;
407 }
408
409 if (urb->transfer_buffer == NULL) 401 if (urb->transfer_buffer == NULL)
410 return 'Z'; 402 return 'Z';
411
412 mon_copy_to_buff(rp, offset, urb->transfer_buffer, length); 403 mon_copy_to_buff(rp, offset, urb->transfer_buffer, length);
413 return 0; 404 return 0;
414} 405}
@@ -635,7 +626,6 @@ static int mon_bin_open(struct inode *inode, struct file *file)
635 spin_lock_init(&rp->b_lock); 626 spin_lock_init(&rp->b_lock);
636 init_waitqueue_head(&rp->b_wait); 627 init_waitqueue_head(&rp->b_wait);
637 mutex_init(&rp->fetch_lock); 628 mutex_init(&rp->fetch_lock);
638
639 rp->b_size = BUFF_DFL; 629 rp->b_size = BUFF_DFL;
640 630
641 size = sizeof(struct mon_pgmap) * (rp->b_size/CHUNK_SIZE); 631 size = sizeof(struct mon_pgmap) * (rp->b_size/CHUNK_SIZE);