diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-04-26 18:24:05 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-05-16 23:27:41 -0400 |
commit | 55929332c92e5d34d65a8f784604c92677ea3e15 (patch) | |
tree | 555e922d470336d07ace32bb564ac5358379a3c4 /drivers/char/nwflash.c | |
parent | 703c631ebbcadcfd861d01e697fdda7c388fec9a (diff) |
drivers: Push down BKL into various drivers
These are the last remaining device drivers using
the ->ioctl file operation in the drivers directory
(except from v4l drivers).
[fweisbec: drop i8k pushdown as it has been done from
procfs pushdown branch already]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'drivers/char/nwflash.c')
-rw-r--r-- | drivers/char/nwflash.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/char/nwflash.c b/drivers/char/nwflash.c index f80810901db6..043a1c7b86be 100644 --- a/drivers/char/nwflash.c +++ b/drivers/char/nwflash.c | |||
@@ -94,8 +94,9 @@ static int get_flash_id(void) | |||
94 | return c2; | 94 | return c2; |
95 | } | 95 | } |
96 | 96 | ||
97 | static int flash_ioctl(struct inode *inodep, struct file *filep, unsigned int cmd, unsigned long arg) | 97 | static long flash_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) |
98 | { | 98 | { |
99 | lock_kernel(); | ||
99 | switch (cmd) { | 100 | switch (cmd) { |
100 | case CMD_WRITE_DISABLE: | 101 | case CMD_WRITE_DISABLE: |
101 | gbWriteBase64Enable = 0; | 102 | gbWriteBase64Enable = 0; |
@@ -113,8 +114,10 @@ static int flash_ioctl(struct inode *inodep, struct file *filep, unsigned int cm | |||
113 | default: | 114 | default: |
114 | gbWriteBase64Enable = 0; | 115 | gbWriteBase64Enable = 0; |
115 | gbWriteEnable = 0; | 116 | gbWriteEnable = 0; |
117 | unlock_kernel(); | ||
116 | return -EINVAL; | 118 | return -EINVAL; |
117 | } | 119 | } |
120 | unlock_kernel(); | ||
118 | return 0; | 121 | return 0; |
119 | } | 122 | } |
120 | 123 | ||
@@ -631,7 +634,7 @@ static const struct file_operations flash_fops = | |||
631 | .llseek = flash_llseek, | 634 | .llseek = flash_llseek, |
632 | .read = flash_read, | 635 | .read = flash_read, |
633 | .write = flash_write, | 636 | .write = flash_write, |
634 | .ioctl = flash_ioctl, | 637 | .unlocked_ioctl = flash_ioctl, |
635 | }; | 638 | }; |
636 | 639 | ||
637 | static struct miscdevice flash_miscdev = | 640 | static struct miscdevice flash_miscdev = |