[PATCH] Driver Core: pm diagnostics update, check for errors

This patch includes various tweaks in the messaging that appears during
system pm state transitions:

  * Warn about certain illegal calls in the device tree, like resuming
    child before parent or suspending parent before child.  This could
    happen easily enough through sysfs, or in some cases when drivers
    use device_pm_set_parent().

  * Be more consistent about dev_dbg() tracing ... do it for resume() and
    shutdown() too, and never if the driver doesn't have that method.

  * Say which type of system sleep state is being entered.

Except for the warnings, these only affect debug messaging.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Bu işleme şunda yer alıyor:
David Brownell
2005-05-09 08:07:00 -07:00
işlemeyi yapan: Greg KH
ebeveyn ff0d2f90fd
işleme 82428b62aa
4 değiştirilmiş dosya ile 35 ekleme ve 12 silme

Dosyayı Görüntüle

@@ -156,14 +156,14 @@ static int enter_state(suspend_state_t state)
goto Unlock;
}
pr_debug("PM: Preparing system for suspend\n");
pr_debug("PM: Preparing system for %s sleep\n", pm_states[state]);
if ((error = suspend_prepare(state)))
goto Unlock;
pr_debug("PM: Entering state.\n");
pr_debug("PM: Entering %s sleep\n", pm_states[state]);
error = suspend_enter(state);
pr_debug("PM: Finishing up.\n");
pr_debug("PM: Finishing wakeup.\n");
suspend_finish(state);
Unlock:
up(&pm_sem);