aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/nvram.c2
-rw-r--r--drivers/macintosh/via-pmu.c17
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
106static struct miscdevice nvram_dev = { 106static 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)
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};