mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
This commit is contained in:
commit
9063974cdb
6530 changed files with 496538 additions and 426823 deletions
|
|
@ -30,6 +30,7 @@
|
|||
#include <linux/major.h>
|
||||
#include <linux/hid.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/smp_lock.h>
|
||||
|
||||
#include <linux/hidraw.h>
|
||||
|
||||
|
|
@ -157,6 +158,7 @@ static int hidraw_open(struct inode *inode, struct file *file)
|
|||
struct hidraw_list *list;
|
||||
int err = 0;
|
||||
|
||||
lock_kernel();
|
||||
if (!(list = kzalloc(sizeof(struct hidraw_list), GFP_KERNEL))) {
|
||||
err = -ENOMEM;
|
||||
goto out;
|
||||
|
|
@ -183,6 +185,7 @@ static int hidraw_open(struct inode *inode, struct file *file)
|
|||
out_unlock:
|
||||
spin_unlock(&minors_lock);
|
||||
out:
|
||||
unlock_kernel();
|
||||
return err;
|
||||
|
||||
}
|
||||
|
|
@ -319,8 +322,9 @@ int hidraw_connect(struct hid_device *hid)
|
|||
goto out;
|
||||
}
|
||||
|
||||
dev->dev = device_create(hidraw_class, NULL, MKDEV(hidraw_major, minor),
|
||||
"%s%d", "hidraw", minor);
|
||||
dev->dev = device_create_drvdata(hidraw_class, NULL,
|
||||
MKDEV(hidraw_major, minor), NULL,
|
||||
"%s%d", "hidraw", minor);
|
||||
|
||||
if (IS_ERR(dev->dev)) {
|
||||
spin_lock(&minors_lock);
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ static void hid_reset(struct work_struct *work)
|
|||
dev_dbg(&usbhid->intf->dev, "resetting device\n");
|
||||
rc = rc_lock = usb_lock_device_for_reset(hid_to_usb_dev(hid), usbhid->intf);
|
||||
if (rc_lock >= 0) {
|
||||
rc = usb_reset_composite_device(hid_to_usb_dev(hid), usbhid->intf);
|
||||
rc = usb_reset_device(hid_to_usb_dev(hid));
|
||||
if (rc_lock)
|
||||
usb_unlock_device(hid_to_usb_dev(hid));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue