Commit b9bde77a authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jonathan Corbet

macintosh-smu: BKL pushdown

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 600bf814
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
* the userland interface * the userland interface
*/ */
#include <linux/smp_lock.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/device.h> #include <linux/device.h>
...@@ -1083,10 +1084,12 @@ static int smu_open(struct inode *inode, struct file *file) ...@@ -1083,10 +1084,12 @@ static int smu_open(struct inode *inode, struct file *file)
pp->mode = smu_file_commands; pp->mode = smu_file_commands;
init_waitqueue_head(&pp->wait); init_waitqueue_head(&pp->wait);
lock_kernel();
spin_lock_irqsave(&smu_clist_lock, flags); spin_lock_irqsave(&smu_clist_lock, flags);
list_add(&pp->list, &smu_clist); list_add(&pp->list, &smu_clist);
spin_unlock_irqrestore(&smu_clist_lock, flags); spin_unlock_irqrestore(&smu_clist_lock, flags);
file->private_data = pp; file->private_data = pp;
unlock_kernel();
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment