]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - mm/nommu.c
dt-bindings: usb: tegra-xudc: Remove extraneous PHYs
[thirdparty/linux.git] / mm / nommu.c
index 57ba243c6a37f466962891f6d71b7dc0910ffce7..f670d9979a26107304715cbcc68591114b8546ba 100644 (file)
@@ -36,6 +36,7 @@
 #include <linux/printk.h>
 
 #include <linux/uaccess.h>
+#include <linux/uio.h>
 #include <asm/tlb.h>
 #include <asm/tlbflush.h>
 #include <asm/mmu_context.h>
@@ -198,14 +199,13 @@ unsigned long vmalloc_to_pfn(const void *addr)
 }
 EXPORT_SYMBOL(vmalloc_to_pfn);
 
-long vread(char *buf, char *addr, unsigned long count)
+long vread_iter(struct iov_iter *iter, const char *addr, size_t count)
 {
        /* Don't allow overflow */
-       if ((unsigned long) buf + count < count)
-               count = -(unsigned long) buf;
+       if ((unsigned long) addr + count < count)
+               count = -(unsigned long) addr;
 
-       memcpy(buf, addr, count);
-       return count;
+       return copy_to_iter(addr, count, iter);
 }
 
 /*