diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-07-25 04:48:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-25 13:53:43 -0400 |
commit | 47be36a24defbd19aea1354c416ec99f291c7ab8 (patch) | |
tree | 575f4cb98d9b2f18da600031d1ea9383aed4a441 /drivers | |
parent | 76528a42e2c5199a1208909318a9c9948d25d0b7 (diff) |
ip2: push BKL down for the firmware interface
(The tty side is already done)
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/ip2/ip2main.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c index 9cb48fcd316c..689f9dcd3b86 100644 --- a/drivers/char/ip2/ip2main.c +++ b/drivers/char/ip2/ip2main.c | |||
@@ -203,7 +203,7 @@ static int set_serial_info(i2ChanStrPtr, struct serial_struct __user *); | |||
203 | 203 | ||
204 | static ssize_t ip2_ipl_read(struct file *, char __user *, size_t, loff_t *); | 204 | static ssize_t ip2_ipl_read(struct file *, char __user *, size_t, loff_t *); |
205 | static ssize_t ip2_ipl_write(struct file *, const char __user *, size_t, loff_t *); | 205 | static ssize_t ip2_ipl_write(struct file *, const char __user *, size_t, loff_t *); |
206 | static int ip2_ipl_ioctl(struct inode *, struct file *, UINT, ULONG); | 206 | static long ip2_ipl_ioctl(struct file *, UINT, ULONG); |
207 | static int ip2_ipl_open(struct inode *, struct file *); | 207 | static int ip2_ipl_open(struct inode *, struct file *); |
208 | 208 | ||
209 | static int DumpTraceBuffer(char __user *, int); | 209 | static int DumpTraceBuffer(char __user *, int); |
@@ -236,7 +236,7 @@ static const struct file_operations ip2_ipl = { | |||
236 | .owner = THIS_MODULE, | 236 | .owner = THIS_MODULE, |
237 | .read = ip2_ipl_read, | 237 | .read = ip2_ipl_read, |
238 | .write = ip2_ipl_write, | 238 | .write = ip2_ipl_write, |
239 | .ioctl = ip2_ipl_ioctl, | 239 | .unlocked_ioctl = ip2_ipl_ioctl, |
240 | .open = ip2_ipl_open, | 240 | .open = ip2_ipl_open, |
241 | }; | 241 | }; |
242 | 242 | ||
@@ -2845,10 +2845,10 @@ ip2_ipl_write(struct file *pFile, const char __user *pData, size_t count, loff_t | |||
2845 | /* */ | 2845 | /* */ |
2846 | /* */ | 2846 | /* */ |
2847 | /******************************************************************************/ | 2847 | /******************************************************************************/ |
2848 | static int | 2848 | static long |
2849 | ip2_ipl_ioctl ( struct inode *pInode, struct file *pFile, UINT cmd, ULONG arg ) | 2849 | ip2_ipl_ioctl (struct file *pFile, UINT cmd, ULONG arg ) |
2850 | { | 2850 | { |
2851 | unsigned int iplminor = iminor(pInode); | 2851 | unsigned int iplminor = iminor(pFile->f_path.dentry->d_inode); |
2852 | int rc = 0; | 2852 | int rc = 0; |
2853 | void __user *argp = (void __user *)arg; | 2853 | void __user *argp = (void __user *)arg; |
2854 | ULONG __user *pIndex = argp; | 2854 | ULONG __user *pIndex = argp; |
@@ -2859,6 +2859,8 @@ ip2_ipl_ioctl ( struct inode *pInode, struct file *pFile, UINT cmd, ULONG arg ) | |||
2859 | printk (KERN_DEBUG "IP2IPL: ioctl cmd %d, arg %ld\n", cmd, arg ); | 2859 | printk (KERN_DEBUG "IP2IPL: ioctl cmd %d, arg %ld\n", cmd, arg ); |
2860 | #endif | 2860 | #endif |
2861 | 2861 | ||
2862 | lock_kernel(); | ||
2863 | |||
2862 | switch ( iplminor ) { | 2864 | switch ( iplminor ) { |
2863 | case 0: // IPL device | 2865 | case 0: // IPL device |
2864 | rc = -EINVAL; | 2866 | rc = -EINVAL; |
@@ -2919,6 +2921,7 @@ ip2_ipl_ioctl ( struct inode *pInode, struct file *pFile, UINT cmd, ULONG arg ) | |||
2919 | rc = -ENODEV; | 2921 | rc = -ENODEV; |
2920 | break; | 2922 | break; |
2921 | } | 2923 | } |
2924 | unlock_kernel(); | ||
2922 | return rc; | 2925 | return rc; |
2923 | } | 2926 | } |
2924 | 2927 | ||