aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/via-pmu.c
diff options
context:
space:
mode:
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};