diff options
Diffstat (limited to 'drivers/char/lp.c')
-rw-r--r-- | drivers/char/lp.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/char/lp.c b/drivers/char/lp.c index f43485607063..a741e418b456 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c | |||
@@ -135,7 +135,6 @@ | |||
135 | 135 | ||
136 | #include <asm/irq.h> | 136 | #include <asm/irq.h> |
137 | #include <asm/uaccess.h> | 137 | #include <asm/uaccess.h> |
138 | #include <asm/system.h> | ||
139 | 138 | ||
140 | /* if you have more than 8 printers, remember to increase LP_NO */ | 139 | /* if you have more than 8 printers, remember to increase LP_NO */ |
141 | #define LP_NO 8 | 140 | #define LP_NO 8 |
@@ -706,16 +705,13 @@ static long lp_compat_ioctl(struct file *file, unsigned int cmd, | |||
706 | { | 705 | { |
707 | unsigned int minor; | 706 | unsigned int minor; |
708 | struct timeval par_timeout; | 707 | struct timeval par_timeout; |
709 | struct compat_timeval __user *tc; | ||
710 | int ret; | 708 | int ret; |
711 | 709 | ||
712 | minor = iminor(file->f_path.dentry->d_inode); | 710 | minor = iminor(file->f_path.dentry->d_inode); |
713 | mutex_lock(&lp_mutex); | 711 | mutex_lock(&lp_mutex); |
714 | switch (cmd) { | 712 | switch (cmd) { |
715 | case LPSETTIMEOUT: | 713 | case LPSETTIMEOUT: |
716 | tc = compat_ptr(arg); | 714 | if (compat_get_timeval(&par_timeout, compat_ptr(arg))) { |
717 | if (get_user(par_timeout.tv_sec, &tc->tv_sec) || | ||
718 | get_user(par_timeout.tv_usec, &tc->tv_usec)) { | ||
719 | ret = -EFAULT; | 715 | ret = -EFAULT; |
720 | break; | 716 | break; |
721 | } | 717 | } |