Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105981
b: refs/heads/master
c: 6d535d3
h: refs/heads/master
i:
  105979: d0d8c98
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jul 25, 2008
1 parent e53333f commit c8564d3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e05e9f7c4aeb82eaa23e46b29580ff514590c641
refs/heads/master: 6d535d3e6ad395345750c361bd2b7f1b9429455d
18 changes: 13 additions & 5 deletions trunk/drivers/char/ppdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
#include <linux/major.h>
#include <linux/ppdev.h>
#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <linux/uaccess.h>

#define PP_VERSION "ppdev: user-space parallel port driver"
#define CHRDEV "ppdev"
Expand Down Expand Up @@ -328,10 +328,9 @@ static enum ieee1284_phase init_phase (int mode)
return IEEE1284_PH_FWD_IDLE;
}

static int pp_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
unsigned int minor = iminor(inode);
unsigned int minor = iminor(file->f_path.dentry->d_inode);
struct pp_struct *pp = file->private_data;
struct parport * port;
void __user *argp = (void __user *)arg;
Expand Down Expand Up @@ -634,6 +633,15 @@ static int pp_ioctl(struct inode *inode, struct file *file,
return 0;
}

static long pp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
long ret;
lock_kernel();
ret = pp_do_ioctl(file, cmd, arg);
unlock_kernel();
return ret;
}

static int pp_open (struct inode * inode, struct file * file)
{
unsigned int minor = iminor(inode);
Expand Down Expand Up @@ -745,7 +753,7 @@ static const struct file_operations pp_fops = {
.read = pp_read,
.write = pp_write,
.poll = pp_poll,
.ioctl = pp_ioctl,
.unlocked_ioctl = pp_ioctl,
.open = pp_open,
.release = pp_release,
};
Expand Down

0 comments on commit c8564d3

Please sign in to comment.