aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/macintosh/via-pmu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index d6365a9f0637..d524dc245a2c 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -18,6 +18,7 @@
18 * 18 *
19 */ 19 */
20#include <stdarg.h> 20#include <stdarg.h>
21#include <linux/smp_lock.h>
21#include <linux/types.h> 22#include <linux/types.h>
22#include <linux/errno.h> 23#include <linux/errno.h>
23#include <linux/kernel.h> 24#include <linux/kernel.h>
@@ -2047,6 +2048,7 @@ pmu_open(struct inode *inode, struct file *file)
2047 pp->rb_get = pp->rb_put = 0; 2048 pp->rb_get = pp->rb_put = 0;
2048 spin_lock_init(&pp->lock); 2049 spin_lock_init(&pp->lock);
2049 init_waitqueue_head(&pp->wait); 2050 init_waitqueue_head(&pp->wait);
2051 lock_kernel();
2050 spin_lock_irqsave(&all_pvt_lock, flags); 2052 spin_lock_irqsave(&all_pvt_lock, flags);
2051#if defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_PMAC_BACKLIGHT) 2053#if defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_PMAC_BACKLIGHT)
2052 pp->backlight_locker = 0; 2054 pp->backlight_locker = 0;
@@ -2054,6 +2056,7 @@ pmu_open(struct inode *inode, struct file *file)
2054 list_add(&pp->list, &all_pmu_pvt); 2056 list_add(&pp->list, &all_pmu_pvt);
2055 spin_unlock_irqrestore(&all_pvt_lock, flags); 2057 spin_unlock_irqrestore(&all_pvt_lock, flags);
2056 file->private_data = pp; 2058 file->private_data = pp;
2059 unlock_kernel();
2057 return 0; 2060 return 0;
2058} 2061}
2059 2062