• Ming Lei's avatar
    driver core: fix possible missing of device probe · 190888ac
    Ming Lei authored
    Inside bus_add_driver(), one device might be added(device_add()) into
    the bus or probed which is triggered by deferred probe
    just after completing of driver_attach() and before
    'klist_add_tail(&priv->knode_bus, &bus->p->klist_drivers)',
    so the device won't be probed by this driver.
    
    This patch moves the below line
    
    	'klist_add_tail(&priv->knode_bus, &bus->p->klist_drivers)'
    
    before driver_attach() inside bus_add_driver() to fix the
    problem.
    Signed-off-by: default avatarMing Lei <ming.lei@canonical.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    190888ac
bus.c 31.2 KB