]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
PM: Remove WARN_ON from device_pm_add
authorRafael J. Wysocki <rjw@sisk.pl>
Fri, 8 Aug 2008 23:05:13 +0000 (01:05 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 21 Aug 2008 17:15:37 +0000 (10:15 -0700)
PM: Remove WARN_ON from device_pm_add

Fix message in device_pm_add() saying that the device will not be
added to dpm_list, although in fact the device is going to be added
to the list regardless of the ordering violation.

Remove the WARN_ON(true) triggered in that situation, because it is
hit by USB very often and spams the users' logs.

This patch fixes bug #11263

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/base/power/main.c

index 284f564bb12bef60c3eabd7b6d56ce0d55eb13bd..273a944d4040e861afa6a1ea6c601264eec6c4a7 100644 (file)
@@ -74,11 +74,9 @@ void device_pm_add(struct device *dev)
                 kobject_name(&dev->kobj));
        mutex_lock(&dpm_list_mtx);
        if (dev->parent) {
-               if (dev->parent->power.status >= DPM_SUSPENDING) {
-                       dev_warn(dev, "parent %s is sleeping, will not add\n",
+               if (dev->parent->power.status >= DPM_SUSPENDING)
+                       dev_warn(dev, "parent %s should not be sleeping\n",
                                dev->parent->bus_id);
-                       WARN_ON(true);
-               }
        } else if (transition_started) {
                /*
                 * We refuse to register parentless devices while a PM