]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
staging: apf: Modifications to migrate to kernel v4.6
authorMichael Gill <michael.gill@xilinx.com>
Wed, 10 Aug 2016 23:24:39 +0000 (16:24 -0700)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 15 Aug 2016 06:15:24 +0000 (08:15 +0200)
This patch adapts to minor API changes introduces as a result
of the move from v4.4 to v4.6.

Signed-off-by: Michael Gill <gill@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/staging/apf/xilinx-dma-apf.c
drivers/staging/apf/xlnk.c

index 31ddc0f3b928717ce7afba83f64cf121b3dd4c47..7e4c6cf5065fe315af296e9254ea277ce6a34f9a 100644 (file)
@@ -661,7 +661,7 @@ static int pin_user_pages(xlnk_intptr_type uaddr,
        }
 
        down_read(&mm->mmap_sem);
-       status = get_user_pages(curr_task, mm, uaddr, num_pages, write, 1,
+       status = get_user_pages(uaddr, num_pages, write, 1,
                                mapped_pages, NULL);
        up_read(&mm->mmap_sem);
 
@@ -707,7 +707,7 @@ static int pin_user_pages(xlnk_intptr_type uaddr,
        } else {
                pr_err("Failed to pin user pages\n");
                for (pgidx = 0; pgidx < status; pgidx++) {
-                       page_cache_release(mapped_pages[pgidx]);
+                       put_page(mapped_pages[pgidx]);
                }
                return -ENOMEM;
        }
@@ -724,7 +724,7 @@ static int unpin_user_pages(struct scatterlist *sglist, unsigned int cnt)
        for (i = 0; i < cnt; i++) {
                pg = sg_page(sglist + i);
                if (pg) {
-                       page_cache_release(pg);
+                       put_page(pg);
                }
        }
 
index 83d5c803fbb9ac079091f85058bfc33bc513af48..f1231558a540a9f42e6f814855c23b43bc63e86e 100644 (file)
@@ -1081,9 +1081,7 @@ static int xlnk_dmasubmit_ioctl(struct file *filp, unsigned int code,
                        }
                        down_read(&current->mm->mmap_sem);
                        locked_page_count =
-                               get_user_pages(current,
-                                              current->mm,
-                                              first_page * PAGE_SIZE,
+                               get_user_pages(first_page * PAGE_SIZE,
                                               t->sg_list_size, 1, 1,
                                               xlnk_page_store, NULL);
                        up_read(&current->mm->mmap_sem);
@@ -1092,7 +1090,7 @@ static int xlnk_dmasubmit_ioctl(struct file *filp, unsigned int code,
 
                                pr_err("could not get user pages");
                                for (i = 0; i < locked_page_count; i++)
-                                       page_cache_release(xlnk_page_store[i]);
+                                       put_page(xlnk_page_store[i]);
                                kfree(t->sg_list);
                                vfree(t);
                                return -EFAULT;
@@ -1130,7 +1128,7 @@ static int xlnk_dmasubmit_ioctl(struct file *filp, unsigned int code,
 
                                pr_err("could not map user pages");
                                for (i = 0; i < locked_page_count; i++)
-                                       page_cache_release(xlnk_page_store[i]);
+                                       put_page(xlnk_page_store[i]);
                                kfree(t->sg_list);
                                vfree(t);
                                return -EFAULT;
@@ -1236,7 +1234,7 @@ static int xlnk_dmawait_ioctl(struct file *filp, unsigned int code,
                                     t->sg_list_size,
                                     t->transfer_direction);
                        for (i = 0; i < t->sg_list_size; i++)
-                               page_cache_release(sg_page(t->sg_list + i));
+                               put_page(sg_page(t->sg_list + i));
                }
                kfree(t->sg_list);
                vfree(t);