summaryrefslogtreecommitdiff
path: root/drivers/base/core.c
diff options
context:
space:
mode:
authorGaurav Singhal <gsinghal@codeaurora.org>2017-08-16 15:21:23 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-08-28 05:39:41 -0700
commitd697a4790330779d660ba941b56be616966ea78a (patch)
treeecd04b2fe1ad46a8e5216c5ce5b70bf82b61252d /drivers/base/core.c
parent8aedd7084222d4cce3acdfe3c71820c674503bee (diff)
Revert "drivercore: Avoid adding devices without pm_ops to dpm list"
This reverts commit d36bb30811b9ea1467f9b10a5d701240230147b9. Not able to add device with PM core and causing suspend/resume issue in I2C client driver.pm_ops are removed from I2C bus type and should fall back on client driver pm_ops. Reverting this change as we are not able to register I2C client devices with PM core. Change-Id: I973a03b7cd0afca2edb584539ea5c69198bfb089 Signed-off-by: Gaurav Singhal <gsinghal@codeaurora.org>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r--drivers/base/core.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 5a56a8e9f006..f3d395bfe8f6 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1116,13 +1116,7 @@ int device_add(struct device *dev)
error = dpm_sysfs_add(dev);
if (error)
goto DPMError;
- if ((dev->pm_domain) || (dev->type && dev->type->pm)
- || (dev->class && (dev->class->pm || dev->class->resume))
- || (dev->bus && (dev->bus->pm || dev->bus->resume)) ||
- (dev->driver && dev->driver->pm)) {
- device_pm_add(dev);
- }
-
+ device_pm_add(dev);
if (MAJOR(dev->devt)) {
error = device_create_file(dev, &dev_attr_dev);