hiddev.c (5c34202b8bf942da411b6599668a76b07449bbfd) hiddev.c (58037eb961f859607b161c50d9d4ecb374de1e8f)
1/*
2 * Copyright (c) 2001 Paul Stewart
3 * Copyright (c) 2001 Vojtech Pavlik
4 *
5 * HID char devices, giving access to raw HID device events.
6 *
7 */
8

--- 765 unchanged lines hidden (view full) ---

774 if (i == hid->maxcollection && (hid->quirks & HID_QUIRK_HIDDEV) == 0)
775 return -1;
776
777 if (!(hiddev = kzalloc(sizeof(struct hiddev), GFP_KERNEL)))
778 return -1;
779
780 retval = usb_register_dev(usbhid->intf, &hiddev_class);
781 if (retval) {
1/*
2 * Copyright (c) 2001 Paul Stewart
3 * Copyright (c) 2001 Vojtech Pavlik
4 *
5 * HID char devices, giving access to raw HID device events.
6 *
7 */
8

--- 765 unchanged lines hidden (view full) ---

774 if (i == hid->maxcollection && (hid->quirks & HID_QUIRK_HIDDEV) == 0)
775 return -1;
776
777 if (!(hiddev = kzalloc(sizeof(struct hiddev), GFP_KERNEL)))
778 return -1;
779
780 retval = usb_register_dev(usbhid->intf, &hiddev_class);
781 if (retval) {
782 err("Not able to get a minor for this device.");
782 err_hid("Not able to get a minor for this device.");
783 kfree(hiddev);
784 return -1;
785 }
786
787 init_waitqueue_head(&hiddev->wait);
788 INIT_LIST_HEAD(&hiddev->list);
789 spin_lock_init(&hiddev->list_lock);
790 hiddev->hid = hid;

--- 71 unchanged lines hidden ---
783 kfree(hiddev);
784 return -1;
785 }
786
787 init_waitqueue_head(&hiddev->wait);
788 INIT_LIST_HEAD(&hiddev->list);
789 spin_lock_init(&hiddev->list_lock);
790 hiddev->hid = hid;

--- 71 unchanged lines hidden ---