PM / sleep: Go direct_complete if driver has no callbacks
[linux-2.6-block.git] / drivers / base / power / common.c
index 02812bcabcac7985be4ed3421d2b4eb2c65846f6..93ed14cc22524ccdd04301dbe460e0958bb69acf 100644 (file)
@@ -14,6 +14,8 @@
 #include <linux/acpi.h>
 #include <linux/pm_domain.h>
 
+#include "power.h"
+
 /**
  * dev_pm_get_subsys_data - Create or refcount power.subsys_data for device.
  * @dev: Device to handle.
@@ -147,5 +149,6 @@ void dev_pm_domain_set(struct device *dev, struct dev_pm_domain *pd)
        WARN(device_is_bound(dev),
             "PM domains can only be changed for unbound devices\n");
        dev->pm_domain = pd;
+       device_pm_check_callbacks(dev);
 }
 EXPORT_SYMBOL_GPL(dev_pm_domain_set);