aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/power/main.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-06-22 19:52:55 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2011-07-02 08:29:54 -0400
commit564b905ab10d17fb42f86aa8b7b9b796276d1336 (patch)
treeb191c000e55ae1a354bd67876ca6945d2ad87c93 /drivers/base/power/main.c
parentf5da24dbed213d103f00aa9ef26e010b50d2db24 (diff)
PM / Domains: Rename struct dev_power_domain to struct dev_pm_domain
The naming convention used by commit 7538e3db6e015e890825fbd9f86599b (PM: Add support for device power domains), which introduced the struct dev_power_domain type for representing device power domains, evidently confuses some developers who tend to think that objects of this type must correspond to "power domains" as defined by hardware, which is not the case. Namely, at the kernel level, a struct dev_power_domain object can represent arbitrary set of devices that are mutually dependent power management-wise and need not belong to one hardware power domain. To avoid that confusion, rename struct dev_power_domain to struct dev_pm_domain and rename the related pointers in struct device and struct pm_clk_notifier_block from pwr_domain to pm_domain. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'drivers/base/power/main.c')
-rw-r--r--drivers/base/power/main.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 06f09bf89cb2..85b591a5429a 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -425,9 +425,9 @@ static int device_resume_noirq(struct device *dev, pm_message_t state)
425 TRACE_DEVICE(dev); 425 TRACE_DEVICE(dev);
426 TRACE_RESUME(0); 426 TRACE_RESUME(0);
427 427
428 if (dev->pwr_domain) { 428 if (dev->pm_domain) {
429 pm_dev_dbg(dev, state, "EARLY power domain "); 429 pm_dev_dbg(dev, state, "EARLY power domain ");
430 error = pm_noirq_op(dev, &dev->pwr_domain->ops, state); 430 error = pm_noirq_op(dev, &dev->pm_domain->ops, state);
431 } else if (dev->type && dev->type->pm) { 431 } else if (dev->type && dev->type->pm) {
432 pm_dev_dbg(dev, state, "EARLY type "); 432 pm_dev_dbg(dev, state, "EARLY type ");
433 error = pm_noirq_op(dev, dev->type->pm, state); 433 error = pm_noirq_op(dev, dev->type->pm, state);
@@ -521,9 +521,9 @@ static int device_resume(struct device *dev, pm_message_t state, bool async)
521 if (!dev->power.is_suspended) 521 if (!dev->power.is_suspended)
522 goto Unlock; 522 goto Unlock;
523 523
524 if (dev->pwr_domain) { 524 if (dev->pm_domain) {
525 pm_dev_dbg(dev, state, "power domain "); 525 pm_dev_dbg(dev, state, "power domain ");
526 error = pm_op(dev, &dev->pwr_domain->ops, state); 526 error = pm_op(dev, &dev->pm_domain->ops, state);
527 goto End; 527 goto End;
528 } 528 }
529 529
@@ -641,10 +641,10 @@ static void device_complete(struct device *dev, pm_message_t state)
641{ 641{
642 device_lock(dev); 642 device_lock(dev);
643 643
644 if (dev->pwr_domain) { 644 if (dev->pm_domain) {
645 pm_dev_dbg(dev, state, "completing power domain "); 645 pm_dev_dbg(dev, state, "completing power domain ");
646 if (dev->pwr_domain->ops.complete) 646 if (dev->pm_domain->ops.complete)
647 dev->pwr_domain->ops.complete(dev); 647 dev->pm_domain->ops.complete(dev);
648 } else if (dev->type && dev->type->pm) { 648 } else if (dev->type && dev->type->pm) {
649 pm_dev_dbg(dev, state, "completing type "); 649 pm_dev_dbg(dev, state, "completing type ");
650 if (dev->type->pm->complete) 650 if (dev->type->pm->complete)
@@ -744,9 +744,9 @@ static int device_suspend_noirq(struct device *dev, pm_message_t state)
744{ 744{
745 int error; 745 int error;
746 746
747 if (dev->pwr_domain) { 747 if (dev->pm_domain) {
748 pm_dev_dbg(dev, state, "LATE power domain "); 748 pm_dev_dbg(dev, state, "LATE power domain ");
749 error = pm_noirq_op(dev, &dev->pwr_domain->ops, state); 749 error = pm_noirq_op(dev, &dev->pm_domain->ops, state);
750 if (error) 750 if (error)
751 return error; 751 return error;
752 } else if (dev->type && dev->type->pm) { 752 } else if (dev->type && dev->type->pm) {
@@ -853,9 +853,9 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
853 goto Unlock; 853 goto Unlock;
854 } 854 }
855 855
856 if (dev->pwr_domain) { 856 if (dev->pm_domain) {
857 pm_dev_dbg(dev, state, "power domain "); 857 pm_dev_dbg(dev, state, "power domain ");
858 error = pm_op(dev, &dev->pwr_domain->ops, state); 858 error = pm_op(dev, &dev->pm_domain->ops, state);
859 goto End; 859 goto End;
860 } 860 }
861 861
@@ -982,11 +982,11 @@ static int device_prepare(struct device *dev, pm_message_t state)
982 982
983 device_lock(dev); 983 device_lock(dev);
984 984
985 if (dev->pwr_domain) { 985 if (dev->pm_domain) {
986 pm_dev_dbg(dev, state, "preparing power domain "); 986 pm_dev_dbg(dev, state, "preparing power domain ");
987 if (dev->pwr_domain->ops.prepare) 987 if (dev->pm_domain->ops.prepare)
988 error = dev->pwr_domain->ops.prepare(dev); 988 error = dev->pm_domain->ops.prepare(dev);
989 suspend_report_result(dev->pwr_domain->ops.prepare, error); 989 suspend_report_result(dev->pm_domain->ops.prepare, error);
990 if (error) 990 if (error)
991 goto End; 991 goto End;
992 } else if (dev->type && dev->type->pm) { 992 } else if (dev->type && dev->type->pm) {