• Patrick Mochel's avatar
    driver model: replace rwlock in struct bus_type with a rwsem. · ba809e8a
    Patrick Mochel authored
    Synchronize all walks of the device and driver lists of a bus with an rwsem wrapped
    around the entire iterator, instead of using device_lock and dropping it after we 
    grabbed each node. 
    
    Note this also prevents deadlock when walking the list of drivers and calling 
    get_driver(), since get_driver() tries to take device_lock while we already have it
    held.
    ba809e8a
bus.c 4.6 KB