diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-04-02 19:35:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-04-02 19:35:05 -0400 |
commit | cb107161df3c52e58033554dcb40065964350f67 (patch) | |
tree | 6367b72665cab3d5d1e19d65665e55e216c59f87 | |
parent | 264800b5ecc7be49b2c6027738091ff3385e0cae (diff) |
Convert straggling drivers to new six-argument get_user_pages()
Commit d4edcf0d5695 ("mm/gup: Switch all callers of get_user_pages() to
not pass tsk/mm") switched get_user_pages() callers to the simpler model
where they no longer pass in the thread and mm pointer. But since then
we've merged changes to a few drivers that re-introduce use of the old
interface. Let's fix them up.
They continued to work fine (thanks to the truly disgusting macros
introduced in commit cde70140fed8: "mm/gup: Overload get_user_pages()
functions"), but cause unnecessary build noise.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/platform/goldfish/goldfish_pipe.c | 3 | ||||
-rw-r--r-- | drivers/rapidio/devices/rio_mport_cdev.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c index 9973cebb4d6f..07462d79d040 100644 --- a/drivers/platform/goldfish/goldfish_pipe.c +++ b/drivers/platform/goldfish/goldfish_pipe.c | |||
@@ -309,8 +309,7 @@ static ssize_t goldfish_pipe_read_write(struct file *filp, char __user *buffer, | |||
309 | * much memory to the process. | 309 | * much memory to the process. |
310 | */ | 310 | */ |
311 | down_read(¤t->mm->mmap_sem); | 311 | down_read(¤t->mm->mmap_sem); |
312 | ret = get_user_pages(current, current->mm, address, 1, | 312 | ret = get_user_pages(address, 1, !is_write, 0, &page, NULL); |
313 | !is_write, 0, &page, NULL); | ||
314 | up_read(¤t->mm->mmap_sem); | 313 | up_read(¤t->mm->mmap_sem); |
315 | if (ret < 0) | 314 | if (ret < 0) |
316 | break; | 315 | break; |
diff --git a/drivers/rapidio/devices/rio_mport_cdev.c b/drivers/rapidio/devices/rio_mport_cdev.c index 9607bc826460..5d4d91846357 100644 --- a/drivers/rapidio/devices/rio_mport_cdev.c +++ b/drivers/rapidio/devices/rio_mport_cdev.c | |||
@@ -886,7 +886,7 @@ rio_dma_transfer(struct file *filp, uint32_t transfer_mode, | |||
886 | } | 886 | } |
887 | 887 | ||
888 | down_read(¤t->mm->mmap_sem); | 888 | down_read(¤t->mm->mmap_sem); |
889 | pinned = get_user_pages(current, current->mm, | 889 | pinned = get_user_pages( |
890 | (unsigned long)xfer->loc_addr & PAGE_MASK, | 890 | (unsigned long)xfer->loc_addr & PAGE_MASK, |
891 | nr_pages, dir == DMA_FROM_DEVICE, 0, | 891 | nr_pages, dir == DMA_FROM_DEVICE, 0, |
892 | page_list, NULL); | 892 | page_list, NULL); |