diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2018-04-26 04:53:03 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2018-05-14 16:58:44 -0400 |
commit | 4f688748c958deb947759773be6dffe6b44d084d (patch) | |
tree | f403d602c8e114a33618ba35d36b1ceb22a0de01 /drivers/acpi/device_pm.c | |
parent | b56d9c9135629632faff44cff153784e76b82550 (diff) |
PM / Domains: Check for existing PM domain in dev_pm_domain_attach()
Instead of checking if an existing PM domain pointer has been assigned in
genpd_dev_pm_attach() and acpi_dev_pm_attach(), move the check to the
common path in dev_pm_domain_attach(), thus potentially avoid one
unnecessary check.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/device_pm.c')
-rw-r--r-- | drivers/acpi/device_pm.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c index 3d96e4da2d98..d00630016176 100644 --- a/drivers/acpi/device_pm.c +++ b/drivers/acpi/device_pm.c | |||
@@ -1259,9 +1259,6 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on) | |||
1259 | if (!adev) | 1259 | if (!adev) |
1260 | return -ENODEV; | 1260 | return -ENODEV; |
1261 | 1261 | ||
1262 | if (dev->pm_domain) | ||
1263 | return -EEXIST; | ||
1264 | |||
1265 | /* | 1262 | /* |
1266 | * Only attach the power domain to the first device if the | 1263 | * Only attach the power domain to the first device if the |
1267 | * companion is shared by multiple. This is to prevent doing power | 1264 | * companion is shared by multiple. This is to prevent doing power |