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:
6684ba2
)
compat: Handle COMPAT_USE_64BIT_TIME in the lp driver
author
H. Peter Anvin
<
[email protected]
>
Fri, 10 Feb 2012 22:08:52 +0000
(14:08 -0800)
committer
H. Peter Anvin
<
[email protected]
>
Mon, 20 Feb 2012 20:48:47 +0000
(12:48 -0800)
Enable the lp driver to be used with a compat ABI with 64-bit time.
Signed-off-by: H. Peter Anvin <
[email protected]
>
Cc: Arnd Bergmann <
[email protected]
>
Cc: Greg Kroah-Hartman <
[email protected]
>
drivers/char/lp.c
patch
|
blob
|
history
diff --git
a/drivers/char/lp.c
b/drivers/char/lp.c
index f43485607063af7490ae37013de97675fbf156c5..a27097173b3ac1f4e9f2990fe8893c3514dbfecf 100644
(file)
--- a/
drivers/char/lp.c
+++ b/
drivers/char/lp.c
@@
-706,16
+706,13
@@
static long lp_compat_ioctl(struct file *file, unsigned int cmd,
{
unsigned int minor;
struct timeval par_timeout;
- struct compat_timeval __user *tc;
int ret;
minor = iminor(file->f_path.dentry->d_inode);
mutex_lock(&lp_mutex);
switch (cmd) {
case LPSETTIMEOUT:
- tc = compat_ptr(arg);
- if (get_user(par_timeout.tv_sec, &tc->tv_sec) ||
- get_user(par_timeout.tv_usec, &tc->tv_usec)) {
+ if (compat_get_timeval(&par_timeout, compat_ptr(arg))) {
ret = -EFAULT;
break;
}