Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362950
b: refs/heads/master
c: 51fc8e8
h: refs/heads/master
v: v3
  • Loading branch information
Tomi Valkeinen committed Apr 24, 2013
1 parent e436dfc commit 53c9739
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7b3d1c82417b340c73e416db10770379291010ba
refs/heads/master: 51fc8e8aabf1dc89934743c62069acbbe2016fe9
16 changes: 3 additions & 13 deletions trunk/drivers/video/sa1100fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,27 +556,17 @@ static int sa1100fb_mmap(struct fb_info *info,
struct vm_area_struct *vma)
{
struct sa1100fb_info *fbi = (struct sa1100fb_info *)info;
unsigned long start, len, off = vma->vm_pgoff << PAGE_SHIFT;
unsigned long off = vma->vm_pgoff << PAGE_SHIFT;

if (off < info->fix.smem_len) {
vma->vm_pgoff += 1; /* skip over the palette */
return dma_mmap_writecombine(fbi->dev, vma, fbi->map_cpu,
fbi->map_dma, fbi->map_size);
}

start = info->fix.mmio_start;
len = PAGE_ALIGN((start & ~PAGE_MASK) + info->fix.mmio_len);

if ((vma->vm_end - vma->vm_start + off) > len)
return -EINVAL;

off += start & PAGE_MASK;
vma->vm_pgoff = off >> PAGE_SHIFT;
vma->vm_flags |= VM_IO;
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
return io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT,
vma->vm_end - vma->vm_start,
vma->vm_page_prot);

return vm_iomap_memory(vma, info->fix.mmio_start, info->fix.mmio_len);
}

static struct fb_ops sa1100fb_ops = {
Expand Down

0 comments on commit 53c9739

Please sign in to comment.