diff options
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r-- | drivers/base/platform.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index ab4f4ce02722..b2afc29403f9 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/err.h> | 21 | #include <linux/err.h> |
22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
23 | #include <linux/pm_runtime.h> | 23 | #include <linux/pm_runtime.h> |
24 | #include <linux/pm_domain.h> | ||
24 | #include <linux/idr.h> | 25 | #include <linux/idr.h> |
25 | #include <linux/acpi.h> | 26 | #include <linux/acpi.h> |
26 | #include <linux/clk/clk-conf.h> | 27 | #include <linux/clk/clk-conf.h> |
@@ -506,11 +507,12 @@ static int platform_drv_probe(struct device *_dev) | |||
506 | if (ret < 0) | 507 | if (ret < 0) |
507 | return ret; | 508 | return ret; |
508 | 509 | ||
509 | acpi_dev_pm_attach(_dev, true); | 510 | ret = dev_pm_domain_attach(_dev, true); |
510 | 511 | if (ret != -EPROBE_DEFER) { | |
511 | ret = drv->probe(dev); | 512 | ret = drv->probe(dev); |
512 | if (ret) | 513 | if (ret) |
513 | acpi_dev_pm_detach(_dev, true); | 514 | dev_pm_domain_detach(_dev, true); |
515 | } | ||
514 | 516 | ||
515 | if (drv->prevent_deferred_probe && ret == -EPROBE_DEFER) { | 517 | if (drv->prevent_deferred_probe && ret == -EPROBE_DEFER) { |
516 | dev_warn(_dev, "probe deferral not supported\n"); | 518 | dev_warn(_dev, "probe deferral not supported\n"); |
@@ -532,7 +534,7 @@ static int platform_drv_remove(struct device *_dev) | |||
532 | int ret; | 534 | int ret; |
533 | 535 | ||
534 | ret = drv->remove(dev); | 536 | ret = drv->remove(dev); |
535 | acpi_dev_pm_detach(_dev, true); | 537 | dev_pm_domain_detach(_dev, true); |
536 | 538 | ||
537 | return ret; | 539 | return ret; |
538 | } | 540 | } |
@@ -543,7 +545,7 @@ static void platform_drv_shutdown(struct device *_dev) | |||
543 | struct platform_device *dev = to_platform_device(_dev); | 545 | struct platform_device *dev = to_platform_device(_dev); |
544 | 546 | ||
545 | drv->shutdown(dev); | 547 | drv->shutdown(dev); |
546 | acpi_dev_pm_detach(_dev, true); | 548 | dev_pm_domain_detach(_dev, true); |
547 | } | 549 | } |
548 | 550 | ||
549 | /** | 551 | /** |