aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/smu.c
diff options
context:
space:
mode:
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 d86d57af282a..32cb0298f88e 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>
@@ -1086,10 +1087,12 @@ static int smu_open(struct inode *inode, struct file *file)
1086 pp->mode = smu_file_commands; 1087 pp->mode = smu_file_commands;
1087 init_waitqueue_head(&pp->wait); 1088 init_waitqueue_head(&pp->wait);
1088 1089
1090 lock_kernel();
1089 spin_lock_irqsave(&smu_clist_lock, flags); 1091 spin_lock_irqsave(&smu_clist_lock, flags);
1090 list_add(&pp->list, &smu_clist); 1092 list_add(&pp->list, &smu_clist);
1091 spin_unlock_irqrestore(&smu_clist_lock, flags); 1093 spin_unlock_irqrestore(&smu_clist_lock, flags);
1092 file->private_data = pp; 1094 file->private_data = pp;
1095 unlock_kernel();
1093 1096
1094 return 0; 1097 return 0;
1095} 1098}