committed by
Jonathan Corbet
parent
7eb500d1a0
commit
ffe83733b8
@@ -18,6 +18,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <linux/smp_lock.h>
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/errno.h>
|
#include <linux/errno.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
@@ -2047,6 +2048,7 @@ pmu_open(struct inode *inode, struct file *file)
|
|||||||
pp->rb_get = pp->rb_put = 0;
|
pp->rb_get = pp->rb_put = 0;
|
||||||
spin_lock_init(&pp->lock);
|
spin_lock_init(&pp->lock);
|
||||||
init_waitqueue_head(&pp->wait);
|
init_waitqueue_head(&pp->wait);
|
||||||
|
lock_kernel();
|
||||||
spin_lock_irqsave(&all_pvt_lock, flags);
|
spin_lock_irqsave(&all_pvt_lock, flags);
|
||||||
#if defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_PMAC_BACKLIGHT)
|
#if defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_PMAC_BACKLIGHT)
|
||||||
pp->backlight_locker = 0;
|
pp->backlight_locker = 0;
|
||||||
@@ -2054,6 +2056,7 @@ pmu_open(struct inode *inode, struct file *file)
|
|||||||
list_add(&pp->list, &all_pmu_pvt);
|
list_add(&pp->list, &all_pmu_pvt);
|
||||||
spin_unlock_irqrestore(&all_pvt_lock, flags);
|
spin_unlock_irqrestore(&all_pvt_lock, flags);
|
||||||
file->private_data = pp;
|
file->private_data = pp;
|
||||||
|
unlock_kernel();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user