Skip to content

Commit

Permalink
compat: Handle COMPAT_USE_64BIT_TIME in the lp driver
Browse files Browse the repository at this point in the history
Enable the lp driver to be used with a compat ABI with 64-bit time.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <greg@kroah.com>
  • Loading branch information
H. Peter Anvin committed Feb 20, 2012
1 parent 6684ba2 commit 9dd4cca
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/char/lp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 9dd4cca

Please sign in to comment.