Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105976
b: refs/heads/master
c: 47be36a
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jul 25, 2008
1 parent b324ffd commit 32ef7f3
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 76528a42e2c5199a1208909318a9c9948d25d0b7
refs/heads/master: 47be36a24defbd19aea1354c416ec99f291c7ab8
13 changes: 8 additions & 5 deletions trunk/drivers/char/ip2/ip2main.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ static int set_serial_info(i2ChanStrPtr, struct serial_struct __user *);

static ssize_t ip2_ipl_read(struct file *, char __user *, size_t, loff_t *);
static ssize_t ip2_ipl_write(struct file *, const char __user *, size_t, loff_t *);
static int ip2_ipl_ioctl(struct inode *, struct file *, UINT, ULONG);
static long ip2_ipl_ioctl(struct file *, UINT, ULONG);
static int ip2_ipl_open(struct inode *, struct file *);

static int DumpTraceBuffer(char __user *, int);
Expand Down Expand Up @@ -236,7 +236,7 @@ static const struct file_operations ip2_ipl = {
.owner = THIS_MODULE,
.read = ip2_ipl_read,
.write = ip2_ipl_write,
.ioctl = ip2_ipl_ioctl,
.unlocked_ioctl = ip2_ipl_ioctl,
.open = ip2_ipl_open,
};

Expand Down Expand Up @@ -2845,10 +2845,10 @@ ip2_ipl_write(struct file *pFile, const char __user *pData, size_t count, loff_t
/* */
/* */
/******************************************************************************/
static int
ip2_ipl_ioctl ( struct inode *pInode, struct file *pFile, UINT cmd, ULONG arg )
static long
ip2_ipl_ioctl (struct file *pFile, UINT cmd, ULONG arg )
{
unsigned int iplminor = iminor(pInode);
unsigned int iplminor = iminor(pFile->f_path.dentry->d_inode);
int rc = 0;
void __user *argp = (void __user *)arg;
ULONG __user *pIndex = argp;
Expand All @@ -2859,6 +2859,8 @@ ip2_ipl_ioctl ( struct inode *pInode, struct file *pFile, UINT cmd, ULONG arg )
printk (KERN_DEBUG "IP2IPL: ioctl cmd %d, arg %ld\n", cmd, arg );
#endif

lock_kernel();

switch ( iplminor ) {
case 0: // IPL device
rc = -EINVAL;
Expand Down Expand Up @@ -2919,6 +2921,7 @@ ip2_ipl_ioctl ( struct inode *pInode, struct file *pFile, UINT cmd, ULONG arg )
rc = -ENODEV;
break;
}
unlock_kernel();
return rc;
}

Expand Down

0 comments on commit 32ef7f3

Please sign in to comment.