aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/via-pmu.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-04-26 18:24:05 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2010-05-16 23:27:41 -0400
commit55929332c92e5d34d65a8f784604c92677ea3e15 (patch)
tree555e922d470336d07ace32bb564ac5358379a3c4 /drivers/macintosh/via-pmu.c
parent703c631ebbcadcfd861d01e697fdda7c388fec9a (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/via-pmu.c')
-rw-r--r--drivers/macintosh/via-pmu.c17
1 files changed, 14 insertions, 3 deletions
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)
2273device_initcall(register_pmu_pm_ops); 2273device_initcall(register_pmu_pm_ops);
2274#endif 2274#endif
2275 2275
2276static int 2276static int pmu_ioctl(struct file *filp,
2277pmu_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
2339static 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
2340static const struct file_operations pmu_device_fops = { 2351static 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};