diff options
author | Rafael J. Wysocki | 2014-10-07 01:18:12 +0200 |
---|---|---|
committer | Rafael J. Wysocki | 2014-10-07 01:18:12 +0200 |
commit | 49a09c9ab012017c4673b86dbb28c616cf8f2381 (patch) | |
tree | 9cdc84a6b837268060bfad89d5bd43032dc0fd74 /drivers/spi | |
parent | 28c399e2a1ed03bd175858deef1e233317103089 (diff) | |
parent | f39cb1797ec1094b196d3dab44a7ca6060813d38 (diff) |
Merge branch 'pm-domains'
* pm-domains: (32 commits)
PM / Domains: Rename cpu_data to cpuidle_data
PM / Domains: Move dev_pm_domain_attach|detach() to pm_domain.h
PM / Domains: Remove legacy API for adding devices through DT
PM / Domains: Add genpd attach/detach callbacks
PM / Domains: add debugfs listing of struct generic_pm_domain-s
ACPI / PM: Convert acpi_dev_pm_detach() into a static function
ARM: exynos: Move to generic PM domain DT bindings
amba: Add support for attach/detach of PM domains
spi: core: Convert to dev_pm_domain_attach|detach()
mmc: sdio: Convert to dev_pm_domain_attach|detach()
i2c: core: Convert to dev_pm_domain_attach|detach()
drivercore / platform: Convert to dev_pm_domain_attach|detach()
PM / Domains: Add APIs to attach/detach a PM domain for a device
PM / Domains: Add generic OF-based PM domain look-up
ACPI / PM: Assign the ->detach() callback when attaching the PM domain
PM / Domains: Add a detach callback to the struct dev_pm_domain
PM / domains: Spelling s/domian/domain/
PM / domains: Keep declaration of dev_power_governors together
PM / domains: Remove default_stop_ok() API
drivers: sh: Leave disabling of unused PM domains to genpd
...
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index ca935df80c88..3907f1493e7d 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -35,6 +35,7 @@ #include <linux/spi/spi.h> #include <linux/of_gpio.h> #include <linux/pm_runtime.h> +#include <linux/pm_domain.h> #include <linux/export.h> #include <linux/sched/rt.h> #include <linux/delay.h> @@ -264,10 +265,12 @@ static int spi_drv_probe(struct device *dev) if (ret) return ret; - acpi_dev_pm_attach(dev, true); - ret = sdrv->probe(to_spi_device(dev)); - if (ret) - acpi_dev_pm_detach(dev, true); + ret = dev_pm_domain_attach(dev, true); + if (ret != -EPROBE_DEFER) { + ret = sdrv->probe(to_spi_device(dev)); + if (ret) + dev_pm_domain_detach(dev, true); + } return ret; } @@ -278,7 +281,7 @@ static int spi_drv_remove(struct device *dev) int ret; ret = sdrv->remove(to_spi_device(dev)); - acpi_dev_pm_detach(dev, true); + dev_pm_domain_detach(dev, true); return ret; } |