• Arnd Bergmann's avatar
    HID: hiddev: use usb_find_interface, get rid of BKL · bd25f4dd
    Arnd Bergmann authored
    This removes the private hiddev_table in the usbhid
    driver and changes it to use usb_find_interface
    instead.
    
    The advantage is that we can avoid the race between
    usb_register_dev and usb_open and no longer need the
    big kernel lock.
    
    This doesn't introduce race condition -- the intf pointer could be
    invalidated only in hiddev_disconnect() through usb_deregister_dev(),
    but that will block on minor_rwsem and not actually remove the device
    until usb_open().
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Cc: Jiri Kosina <jkosina@suse.cz>
    Cc: "Greg Kroah-Hartman" <gregkh@suse.de>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    bd25f4dd
hiddev.c 23.5 KB