diff options
Diffstat (limited to 'drivers/macintosh/smu.c')
-rw-r--r-- | drivers/macintosh/smu.c | 3 |
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 | } |