aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/smu.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-15 01:44:51 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-15 01:44:51 -0400
commit43d2548bb2ef7e6d753f91468a746784041e522d (patch)
tree77d13fcd48fd998393abb825ec36e2b732684a73 /drivers/macintosh/smu.c
parent585583d95c5660973bc0cf64add517b040acd8a4 (diff)
parent85082fd7cbe3173198aac0eb5e85ab1edcc6352c (diff)
Merge commit '85082fd7cbe3173198aac0eb5e85ab1edcc6352c' into test-build
Manual fixup of: arch/powerpc/Kconfig
Diffstat (limited to 'drivers/macintosh/smu.c')
-rw-r--r--drivers/macintosh/smu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 76dbf25cb70f..96faa799b82a 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -19,6 +19,7 @@
19 * the userland interface 19 * the userland interface
20 */ 20 */
21 21
22#include <linux/smp_lock.h>
22#include <linux/types.h> 23#include <linux/types.h>
23#include <linux/kernel.h> 24#include <linux/kernel.h>
24#include <linux/device.h> 25#include <linux/device.h>
@@ -1090,10 +1091,12 @@ static int smu_open(struct inode *inode, struct file *file)
1090 pp->mode = smu_file_commands; 1091 pp->mode = smu_file_commands;
1091 init_waitqueue_head(&pp->wait); 1092 init_waitqueue_head(&pp->wait);
1092 1093
1094 lock_kernel();
1093 spin_lock_irqsave(&smu_clist_lock, flags); 1095 spin_lock_irqsave(&smu_clist_lock, flags);
1094 list_add(&pp->list, &smu_clist); 1096 list_add(&pp->list, &smu_clist);
1095 spin_unlock_irqrestore(&smu_clist_lock, flags); 1097 spin_unlock_irqrestore(&smu_clist_lock, flags);
1096 file->private_data = pp; 1098 file->private_data = pp;
1099 unlock_kernel();
1097 1100
1098 return 0; 1101 return 0;
1099} 1102}