mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
Merge commit '85082fd7cb' into test-build
Manual fixup of: arch/powerpc/Kconfig
This commit is contained in:
commit
43d2548bb2
1806 changed files with 120558 additions and 38321 deletions
|
|
@ -643,12 +643,18 @@ do_adb_query(struct adb_request *req)
|
|||
static int adb_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct adbdev_state *state;
|
||||
int ret = 0;
|
||||
|
||||
if (iminor(inode) > 0 || adb_controller == NULL)
|
||||
return -ENXIO;
|
||||
lock_kernel();
|
||||
if (iminor(inode) > 0 || adb_controller == NULL) {
|
||||
ret = -ENXIO;
|
||||
goto out;
|
||||
}
|
||||
state = kmalloc(sizeof(struct adbdev_state), GFP_KERNEL);
|
||||
if (state == 0)
|
||||
return -ENOMEM;
|
||||
if (state == 0) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
file->private_data = state;
|
||||
spin_lock_init(&state->lock);
|
||||
atomic_set(&state->n_pending, 0);
|
||||
|
|
@ -656,7 +662,9 @@ static int adb_open(struct inode *inode, struct file *file)
|
|||
init_waitqueue_head(&state->wait_queue);
|
||||
state->inuse = 1;
|
||||
|
||||
return 0;
|
||||
out:
|
||||
unlock_kernel();
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int adb_release(struct inode *inode, struct file *file)
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/miscdevice.h>
|
||||
|
|
@ -119,6 +120,7 @@ anslcd_ioctl( struct inode * inode, struct file * file,
|
|||
static int
|
||||
anslcd_open( struct inode * inode, struct file * file )
|
||||
{
|
||||
cycle_kernel_lock();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
* the userland interface
|
||||
*/
|
||||
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/device.h>
|
||||
|
|
@ -1090,10 +1091,12 @@ static int smu_open(struct inode *inode, struct file *file)
|
|||
pp->mode = smu_file_commands;
|
||||
init_waitqueue_head(&pp->wait);
|
||||
|
||||
lock_kernel();
|
||||
spin_lock_irqsave(&smu_clist_lock, flags);
|
||||
list_add(&pp->list, &smu_clist);
|
||||
spin_unlock_irqrestore(&smu_clist_lock, flags);
|
||||
file->private_data = pp;
|
||||
unlock_kernel();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
*
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/kernel.h>
|
||||
|
|
@ -2047,6 +2048,7 @@ pmu_open(struct inode *inode, struct file *file)
|
|||
pp->rb_get = pp->rb_put = 0;
|
||||
spin_lock_init(&pp->lock);
|
||||
init_waitqueue_head(&pp->wait);
|
||||
lock_kernel();
|
||||
spin_lock_irqsave(&all_pvt_lock, flags);
|
||||
#if defined(CONFIG_INPUT_ADBHID) && defined(CONFIG_PMAC_BACKLIGHT)
|
||||
pp->backlight_locker = 0;
|
||||
|
|
@ -2054,6 +2056,7 @@ pmu_open(struct inode *inode, struct file *file)
|
|||
list_add(&pp->list, &all_pmu_pvt);
|
||||
spin_unlock_irqrestore(&all_pvt_lock, flags);
|
||||
file->private_data = pp;
|
||||
unlock_kernel();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue