diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-08-19 12:08:37 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-10-09 02:39:06 -0400 |
commit | d88c242623e90c99864317baae1e192bece2af57 (patch) | |
tree | b76dd610d6ba1a6b1ea6d6b0270d18d20d6c2f86 /drivers/misc/carma | |
parent | 1a37f5ecb707aded73133e14b58102343de56bbd (diff) |
carma-fpga: switch to simple_read_from_buffer()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/misc/carma')
-rw-r--r-- | drivers/misc/carma/carma-fpga-program.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/misc/carma/carma-fpga-program.c b/drivers/misc/carma/carma-fpga-program.c index f390deeae3cf..7e97e53f9ff2 100644 --- 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, | |||
749 | loff_t *f_pos) | 749 | loff_t *f_pos) |
750 | { | 750 | { |
751 | struct fpga_dev *priv = filp->private_data; | 751 | struct fpga_dev *priv = filp->private_data; |
752 | 752 | return simple_read_from_buffer(buf, count, ppos, | |
753 | count = min_t(size_t, priv->bytes - *f_pos, count); | 753 | priv->vb.vaddr, priv->bytes); |
754 | if (copy_to_user(buf, priv->vb.vaddr + *f_pos, count)) | ||
755 | return -EFAULT; | ||
756 | |||
757 | *f_pos += count; | ||
758 | return count; | ||
759 | } | 754 | } |
760 | 755 | ||
761 | static loff_t fpga_llseek(struct file *filp, loff_t offset, int origin) | 756 | static loff_t fpga_llseek(struct file *filp, loff_t offset, int origin) |