• Greg Kroah-Hartman's avatar
    [PATCH] USB device reference counting api cleanup changes · 04adba5a
    Greg Kroah-Hartman authored
    This patch replaces the awkwardly named usb_inc_dev_use() and
    usb_dec_dev_use() with usb_get_dev() and usb_put_dev() to match the
    naming convention of the rest of the kernel's reference counted
    structures.  It also does away with the special case of usb_free_dev(),
    and has usb_put_dev() be the same thing (through a #define, just like
    usb_free_urb() works.)
    
    Now when the last person calls usb_put_dev() or usb_free_dev() the
    structure is cleaned up.  This allows the different host controller
    drivers to implement their logic differently if they want to (as they
    do), and everyone can be happy and stop arguing about the "proper" way
    to write their host controller drivers :)
    04adba5a
usbvideo.c 64.8 KB