• R
    ACPI / scan: Simplify ACPI driver probing · d9e455f5
    Rafael J. Wysocki 提交于
    There is no particular reason why acpi_bus_driver_init() needs to be
    a separate function and its location with respect to its only caller,
    acpi_device_probe(), makes the code a bit difficult to follow.
    
    Besides, it doesn't really make sense to check if 'device' is not
    NULL in acpi_bus_driver_init(), because we've already dereferenced
    dev->driver in acpi_device_probe() at that point and, moreover,
    'device' cannot be NULL then, because acpi_device_probe() is called
    via really_probe() (which also sets dev->driver for that matter).
    
    For these reasons, drop acpi_bus_driver_init() altogether and move
    the remaining code from it directly into acpi_device_probe().
    Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
    d9e455f5
scan.c 52.4 KB