projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07ecb79
)
uml: use simple_write_to_buffer()
author
Akinobu Mita
<
[email protected]
>
Thu, 13 Jan 2011 00:59:28 +0000
(16:59 -0800)
committer
Linus Torvalds
<
[email protected]
>
Thu, 13 Jan 2011 16:03:07 +0000
(08:03 -0800)
Simplify write file operation for mmapper by using
simple_write_to_buffer().
Signed-off-by: Akinobu Mita <
[email protected]
>
Cc: Jeff Dike <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
arch/um/drivers/mmapper_kern.c
patch
|
blob
|
history
diff --git
a/arch/um/drivers/mmapper_kern.c
b/arch/um/drivers/mmapper_kern.c
index 6bc73f0e8e293dd43d7be0f38d16954b1bba49fb..7e0619c2c2c61531749dc8f22b5612d42d6f5b85 100644
(file)
--- a/
arch/um/drivers/mmapper_kern.c
+++ b/
arch/um/drivers/mmapper_kern.c
@@
-37,13
+37,7
@@
static ssize_t mmapper_write(struct file *file, const char __user *buf,
if (*ppos > mmapper_size)
return -EINVAL;
- if (count > mmapper_size - *ppos)
- count = mmapper_size - *ppos;
-
- if (copy_from_user(&v_buf[*ppos], buf, count))
- return -EFAULT;
-
- return count;
+ return simple_write_to_buffer(v_buf, mmapper_size, ppos, buf, count);
}
static long mmapper_ioctl(struct file *file, unsigned int cmd, unsigned long arg)