diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-12-06 17:16:47 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-12-08 16:59:23 -0500 |
commit | c9914854b4ca339e511d052ce3a1a441ef15b928 (patch) | |
tree | a58486eb9156a15cefe1c6b2ce2483991faeeae7 /drivers | |
parent | e84b2c202771bbd538866207efcb1f7dbab8045b (diff) |
PM / Domains: Fix default system suspend/resume operations
Commit d23b9b00cdde5c93b914a172cecd57d5625fcd04 (PM / Domains: Rework
system suspend callback routines (v2)) broke the system suspend and
resume handling by devices belonging to generic PM domains, because
it used freeze/thaw callbacks instead of suspend/resume ones and
didn't initialize device callbacks for system suspend/resume
properly at all. Fix those problems.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/power/domain.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index ad6ba2e04677..92e6a9048065 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c | |||
@@ -1435,7 +1435,7 @@ static int pm_genpd_default_restore_state(struct device *dev) | |||
1435 | */ | 1435 | */ |
1436 | static int pm_genpd_default_suspend(struct device *dev) | 1436 | static int pm_genpd_default_suspend(struct device *dev) |
1437 | { | 1437 | { |
1438 | int (*cb)(struct device *__dev) = dev_gpd_data(dev)->ops.freeze; | 1438 | int (*cb)(struct device *__dev) = dev_gpd_data(dev)->ops.suspend; |
1439 | 1439 | ||
1440 | return cb ? cb(dev) : pm_generic_suspend(dev); | 1440 | return cb ? cb(dev) : pm_generic_suspend(dev); |
1441 | } | 1441 | } |
@@ -1446,7 +1446,7 @@ static int pm_genpd_default_suspend(struct device *dev) | |||
1446 | */ | 1446 | */ |
1447 | static int pm_genpd_default_suspend_late(struct device *dev) | 1447 | static int pm_genpd_default_suspend_late(struct device *dev) |
1448 | { | 1448 | { |
1449 | int (*cb)(struct device *__dev) = dev_gpd_data(dev)->ops.freeze_late; | 1449 | int (*cb)(struct device *__dev) = dev_gpd_data(dev)->ops.suspend_late; |
1450 | 1450 | ||
1451 | return cb ? cb(dev) : pm_generic_suspend_noirq(dev); | 1451 | return cb ? cb(dev) : pm_generic_suspend_noirq(dev); |
1452 | } | 1452 | } |
@@ -1457,7 +1457,7 @@ static int pm_genpd_default_suspend_late(struct device *dev) | |||
1457 | */ | 1457 | */ |
1458 | static int pm_genpd_default_resume_early(struct device *dev) | 1458 | static int pm_genpd_default_resume_early(struct device *dev) |
1459 | { | 1459 | { |
1460 | int (*cb)(struct device *__dev) = dev_gpd_data(dev)->ops.thaw_early; | 1460 | int (*cb)(struct device *__dev) = dev_gpd_data(dev)->ops.resume_early; |
1461 | 1461 | ||
1462 | return cb ? cb(dev) : pm_generic_resume_noirq(dev); | 1462 | return cb ? cb(dev) : pm_generic_resume_noirq(dev); |
1463 | } | 1463 | } |
@@ -1468,7 +1468,7 @@ static int pm_genpd_default_resume_early(struct device *dev) | |||
1468 | */ | 1468 | */ |
1469 | static int pm_genpd_default_resume(struct device *dev) | 1469 | static int pm_genpd_default_resume(struct device *dev) |
1470 | { | 1470 | { |
1471 | int (*cb)(struct device *__dev) = dev_gpd_data(dev)->ops.thaw; | 1471 | int (*cb)(struct device *__dev) = dev_gpd_data(dev)->ops.resume; |
1472 | 1472 | ||
1473 | return cb ? cb(dev) : pm_generic_resume(dev); | 1473 | return cb ? cb(dev) : pm_generic_resume(dev); |
1474 | } | 1474 | } |
@@ -1563,10 +1563,10 @@ void pm_genpd_init(struct generic_pm_domain *genpd, | |||
1563 | genpd->domain.ops.complete = pm_genpd_complete; | 1563 | genpd->domain.ops.complete = pm_genpd_complete; |
1564 | genpd->dev_ops.save_state = pm_genpd_default_save_state; | 1564 | genpd->dev_ops.save_state = pm_genpd_default_save_state; |
1565 | genpd->dev_ops.restore_state = pm_genpd_default_restore_state; | 1565 | genpd->dev_ops.restore_state = pm_genpd_default_restore_state; |
1566 | genpd->dev_ops.freeze = pm_genpd_default_suspend; | 1566 | genpd->dev_ops.suspend = pm_genpd_default_suspend; |
1567 | genpd->dev_ops.freeze_late = pm_genpd_default_suspend_late; | 1567 | genpd->dev_ops.suspend_late = pm_genpd_default_suspend_late; |
1568 | genpd->dev_ops.thaw_early = pm_genpd_default_resume_early; | 1568 | genpd->dev_ops.resume_early = pm_genpd_default_resume_early; |
1569 | genpd->dev_ops.thaw = pm_genpd_default_resume; | 1569 | genpd->dev_ops.resume = pm_genpd_default_resume; |
1570 | genpd->dev_ops.freeze = pm_genpd_default_freeze; | 1570 | genpd->dev_ops.freeze = pm_genpd_default_freeze; |
1571 | genpd->dev_ops.freeze_late = pm_genpd_default_freeze_late; | 1571 | genpd->dev_ops.freeze_late = pm_genpd_default_freeze_late; |
1572 | genpd->dev_ops.thaw_early = pm_genpd_default_thaw_early; | 1572 | genpd->dev_ops.thaw_early = pm_genpd_default_thaw_early; |