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 77ad192962c5..b82fcd210bf3 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>
@@ -1083,10 +1084,12 @@ static int smu_open(struct inode *inode, struct file *file)
1083 pp->mode = smu_file_commands; 1084 pp->mode = smu_file_commands;
1084 init_waitqueue_head(&pp->wait); 1085 init_waitqueue_head(&pp->wait);
1085 1086
1087 lock_kernel();
1086 spin_lock_irqsave(&smu_clist_lock, flags); 1088 spin_lock_irqsave(&smu_clist_lock, flags);
1087 list_add(&pp->list, &smu_clist); 1089 list_add(&pp->list, &smu_clist);
1088 spin_unlock_irqrestore(&smu_clist_lock, flags); 1090 spin_unlock_irqrestore(&smu_clist_lock, flags);
1089 file->private_data = pp; 1091 file->private_data = pp;
1092 unlock_kernel();
1090 1093
1091 return 0; 1094 return 0;
1092} 1095}