]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/staging/android/ion/ion.c
Merge branches 'pm-core', 'pm-qos', 'pm-domains' and 'pm-opp'
[linux.git] / drivers / staging / android / ion / ion.c
index 209a8f7ef02bd4b04cabefad50d17351e5e6990c..937c2d5d7ec3f922d17fa38ceaf9f67f43a0a87b 100644 (file)
@@ -882,7 +882,7 @@ static int ion_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
        BUG_ON(!buffer->pages || !buffer->pages[vmf->pgoff]);
 
        pfn = page_to_pfn(ion_buffer_page(buffer->pages[vmf->pgoff]));
-       ret = vm_insert_pfn(vma, (unsigned long)vmf->virtual_address, pfn);
+       ret = vm_insert_pfn(vma, vmf->address, pfn);
        mutex_unlock(&buffer->lock);
        if (ret)
                return VM_FAULT_ERROR;
@@ -1013,7 +1013,7 @@ static int ion_dma_buf_end_cpu_access(struct dma_buf *dmabuf,
        return 0;
 }
 
-static struct dma_buf_ops dma_buf_ops = {
+static const struct dma_buf_ops dma_buf_ops = {
        .map_dma_buf = ion_map_dma_buf,
        .unmap_dma_buf = ion_unmap_dma_buf,
        .mmap = ion_mmap,
@@ -1300,7 +1300,7 @@ static int ion_debug_heap_show(struct seq_file *s, void *unused)
                        seq_printf(s, "%16s %16u %16zu %d %d\n",
                                   buffer->task_comm, buffer->pid,
                                   buffer->size, buffer->kmap_cnt,
-                                  atomic_read(&buffer->ref.refcount));
+                                  kref_read(&buffer->ref));
                        total_orphaned_size += buffer->size;
                }
        }