diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-07-25 04:48:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-25 13:53:43 -0400 |
commit | f6759fdcfd79ff1827fd5d4ddfe876164466d30d (patch) | |
tree | df722e40c8858a97a8c72430caaa57ff0a202a85 /drivers/char/rio | |
parent | 909d145f0decbc4f17955e1fc4122a669a51fbc0 (diff) |
rio: push down the BKL into the firmware ioctl handler
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/char/rio')
-rw-r--r-- | drivers/char/rio/rio_linux.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c index 0cdfee152916..a8f68a3f14dd 100644 --- a/drivers/char/rio/rio_linux.c +++ b/drivers/char/rio/rio_linux.c | |||
@@ -179,7 +179,7 @@ static int rio_set_real_termios(void *ptr); | |||
179 | static void rio_hungup(void *ptr); | 179 | static void rio_hungup(void *ptr); |
180 | static void rio_close(void *ptr); | 180 | static void rio_close(void *ptr); |
181 | static int rio_chars_in_buffer(void *ptr); | 181 | static int rio_chars_in_buffer(void *ptr); |
182 | static int rio_fw_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); | 182 | static long rio_fw_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); |
183 | static int rio_init_drivers(void); | 183 | static int rio_init_drivers(void); |
184 | 184 | ||
185 | static void my_hd(void *addr, int len); | 185 | static void my_hd(void *addr, int len); |
@@ -240,7 +240,7 @@ static struct real_driver rio_real_driver = { | |||
240 | 240 | ||
241 | static const struct file_operations rio_fw_fops = { | 241 | static const struct file_operations rio_fw_fops = { |
242 | .owner = THIS_MODULE, | 242 | .owner = THIS_MODULE, |
243 | .ioctl = rio_fw_ioctl, | 243 | .unlocked_ioctl = rio_fw_ioctl, |
244 | }; | 244 | }; |
245 | 245 | ||
246 | static struct miscdevice rio_fw_device = { | 246 | static struct miscdevice rio_fw_device = { |
@@ -560,13 +560,15 @@ static void rio_close(void *ptr) | |||
560 | 560 | ||
561 | 561 | ||
562 | 562 | ||
563 | static int rio_fw_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) | 563 | static long rio_fw_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
564 | { | 564 | { |
565 | int rc = 0; | 565 | int rc = 0; |
566 | func_enter(); | 566 | func_enter(); |
567 | 567 | ||
568 | /* The "dev" argument isn't used. */ | 568 | /* The "dev" argument isn't used. */ |
569 | lock_kernel(); | ||
569 | rc = riocontrol(p, 0, cmd, arg, capable(CAP_SYS_ADMIN)); | 570 | rc = riocontrol(p, 0, cmd, arg, capable(CAP_SYS_ADMIN)); |
571 | unlock_kernel(); | ||
570 | 572 | ||
571 | func_exit(); | 573 | func_exit(); |
572 | return rc; | 574 | return rc; |