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/macintosh | |
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/macintosh')
-rw-r--r-- | drivers/macintosh/nvram.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/via-pmu.c | 17 |
2 files changed, 15 insertions, 4 deletions
diff --git a/drivers/macintosh/nvram.c b/drivers/macintosh/nvram.c index c876349c32de..a271c8218d82 100644 --- a/drivers/macintosh/nvram.c +++ b/drivers/macintosh/nvram.c | |||
@@ -100,7 +100,7 @@ const struct file_operations nvram_fops = { | |||
100 | .llseek = nvram_llseek, | 100 | .llseek = nvram_llseek, |
101 | .read = read_nvram, | 101 | .read = read_nvram, |
102 | .write = write_nvram, | 102 | .write = write_nvram, |
103 | .ioctl = nvram_ioctl, | 103 | .unlocked_ioctl = nvram_ioctl, |
104 | }; | 104 | }; |
105 | 105 | ||
106 | static struct miscdevice nvram_dev = { | 106 | static struct miscdevice nvram_dev = { |
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 42764849eb78..3d4fc0f7b00b 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -2273,8 +2273,7 @@ static int register_pmu_pm_ops(void) | |||
2273 | device_initcall(register_pmu_pm_ops); | 2273 | device_initcall(register_pmu_pm_ops); |
2274 | #endif | 2274 | #endif |
2275 | 2275 | ||
2276 | static int | 2276 | static int pmu_ioctl(struct file *filp, |
2277 | pmu_ioctl(struct inode * inode, struct file *filp, | ||
2278 | u_int cmd, u_long arg) | 2277 | u_int cmd, u_long arg) |
2279 | { | 2278 | { |
2280 | __u32 __user *argp = (__u32 __user *)arg; | 2279 | __u32 __user *argp = (__u32 __user *)arg; |
@@ -2337,11 +2336,23 @@ pmu_ioctl(struct inode * inode, struct file *filp, | |||
2337 | return error; | 2336 | return error; |
2338 | } | 2337 | } |
2339 | 2338 | ||
2339 | static long pmu_unlocked_ioctl(struct file *filp, | ||
2340 | u_int cmd, u_long arg) | ||
2341 | { | ||
2342 | int ret; | ||
2343 | |||
2344 | lock_kernel(); | ||
2345 | ret = pmu_ioctl(filp, cmd, arg); | ||
2346 | unlock_kernel(); | ||
2347 | |||
2348 | return ret; | ||
2349 | } | ||
2350 | |||
2340 | static const struct file_operations pmu_device_fops = { | 2351 | static const struct file_operations pmu_device_fops = { |
2341 | .read = pmu_read, | 2352 | .read = pmu_read, |
2342 | .write = pmu_write, | 2353 | .write = pmu_write, |
2343 | .poll = pmu_fpoll, | 2354 | .poll = pmu_fpoll, |
2344 | .ioctl = pmu_ioctl, | 2355 | .unlocked_ioctl = pmu_unlocked_ioctl, |
2345 | .open = pmu_open, | 2356 | .open = pmu_open, |
2346 | .release = pmu_release, | 2357 | .release = pmu_release, |
2347 | }; | 2358 | }; |