Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.73 KB | None | 0 0
  1. index ffccd40ea67d..0fedf4a97f65 100644
  2. --- a/drivers/usb/core/devio.c
  3. +++ b/drivers/usb/core/devio.c
  4. @@ -240,9 +240,14 @@ static int usbdev_mmap(struct file *file, struct vm_area_struct *vma)
  5.         usbm->vma_use_count = 1;
  6.         INIT_LIST_HEAD(&usbm->memlist);
  7.  
  8. +#ifdef CONFIG_X86
  9.         if (remap_pfn_range(vma, vma->vm_start,
  10.                         virt_to_phys(usbm->mem) >> PAGE_SHIFT,
  11.                         size, vma->vm_page_prot) < 0) {
  12. +#else /* !CONFIG_X86 */
  13. +       if (dma_mmap_coherent(ps->dev->bus->sysdev,
  14. +                       vma, mem, dma_handle, size) < 0) {
  15. +#endif /* !CONFIG_X86 */
  16.                 dec_usb_memory_use_count(usbm, &usbm->vma_use_count);
  17.                 return -EAGAIN;
  18.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement