aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2008-05-20 13:16:11 -0400
committerJonathan Corbet <corbet@lwn.net>2008-06-20 16:05:58 -0400
commitb9bde77a6a4f76b767d4363a5f74127528426159 (patch)
tree58bba5cd9b1199ad29ab742c5f9f4429da707728 /drivers/macintosh
parent600bf8140c22e473ef0806ae45214aaaf53e0da3 (diff)
macintosh-smu: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/macintosh')
-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}