projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1a37f5e
)
carma-fpga: switch to simple_read_from_buffer()
author
Al Viro
<viro@zeniv.linux.org.uk>
Tue, 19 Aug 2014 16:08:37 +0000
(12:08 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Thu, 9 Oct 2014 06:39:06 +0000
(
02:39
-0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/misc/carma/carma-fpga-program.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/misc/carma/carma-fpga-program.c
b/drivers/misc/carma/carma-fpga-program.c
index f390deeae3cf7825e485dd12526d6328a317b656..7e97e53f9ff2474fd1741b911c43a277d8408ea2 100644
(file)
--- a/
drivers/misc/carma/carma-fpga-program.c
+++ b/
drivers/misc/carma/carma-fpga-program.c
@@
-749,13
+749,8
@@
static ssize_t fpga_read(struct file *filp, char __user *buf, size_t count,
loff_t *f_pos)
{
struct fpga_dev *priv = filp->private_data;
-
- count = min_t(size_t, priv->bytes - *f_pos, count);
- if (copy_to_user(buf, priv->vb.vaddr + *f_pos, count))
- return -EFAULT;
-
- *f_pos += count;
- return count;
+ return simple_read_from_buffer(buf, count, ppos,
+ priv->vb.vaddr, priv->bytes);
}
static loff_t fpga_llseek(struct file *filp, loff_t offset, int origin)