• Rafael J. Wysocki's avatar
    PM: Run the driver callback directly if the subsystem one is not there · 35cd133c
    Rafael J. Wysocki authored
    Make the PM core execute driver PM callbacks directly if the
    corresponding subsystem callbacks are not present.
    
    There are three reasons for doing that.  First, it reflects the
    behavior of drivers/base/dd.c:really_probe() that runs the driver's
    .probe() callback directly if the bus type's one is not defined, so
    this change will remove one arbitrary difference between the PM core
    and the remaining parts of the driver core.  Second, it will allow
    some subsystems, whose PM callbacks don't do anything except for
    executing driver callbacks, to be simplified quite a bit by removing
    those "forward-only" callbacks.  Finally, it will allow us to remove
    one level of indirection in the system suspend and resume code paths
    where it is not necessary, which is going to lead to less debug noise
    with initcall_debug passed in the kernel command line (messages won't
    be printed for driverless devices whose subsystems don't provide
    PM callbacks among other things).
    Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
    35cd133c
main.c 26.7 KB