diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-06-22 19:52:55 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-07-02 08:29:54 -0400 |
commit | 564b905ab10d17fb42f86aa8b7b9b796276d1336 (patch) | |
tree | b191c000e55ae1a354bd67876ca6945d2ad87c93 /drivers/base/power/clock_ops.c | |
parent | f5da24dbed213d103f00aa9ef26e010b50d2db24 (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/clock_ops.c')
-rw-r--r-- | drivers/base/power/clock_ops.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c index ad367c4139b1..c5624818259e 100644 --- a/drivers/base/power/clock_ops.c +++ b/drivers/base/power/clock_ops.c | |||
@@ -278,11 +278,11 @@ int pm_runtime_clk_resume(struct device *dev) | |||
278 | * | 278 | * |
279 | * For this function to work, @nb must be a member of an object of type | 279 | * For this function to work, @nb must be a member of an object of type |
280 | * struct pm_clk_notifier_block containing all of the requisite data. | 280 | * struct pm_clk_notifier_block containing all of the requisite data. |
281 | * Specifically, the pwr_domain member of that object is copied to the device's | 281 | * Specifically, the pm_domain member of that object is copied to the device's |
282 | * pwr_domain field and its con_ids member is used to populate the device's list | 282 | * pm_domain field and its con_ids member is used to populate the device's list |
283 | * of runtime PM clocks, depending on @action. | 283 | * of runtime PM clocks, depending on @action. |
284 | * | 284 | * |
285 | * If the device's pwr_domain field is already populated with a value different | 285 | * If the device's pm_domain field is already populated with a value different |
286 | * from the one stored in the struct pm_clk_notifier_block object, the function | 286 | * from the one stored in the struct pm_clk_notifier_block object, the function |
287 | * does nothing. | 287 | * does nothing. |
288 | */ | 288 | */ |
@@ -300,14 +300,14 @@ static int pm_runtime_clk_notify(struct notifier_block *nb, | |||
300 | 300 | ||
301 | switch (action) { | 301 | switch (action) { |
302 | case BUS_NOTIFY_ADD_DEVICE: | 302 | case BUS_NOTIFY_ADD_DEVICE: |
303 | if (dev->pwr_domain) | 303 | if (dev->pm_domain) |
304 | break; | 304 | break; |
305 | 305 | ||
306 | error = pm_runtime_clk_init(dev); | 306 | error = pm_runtime_clk_init(dev); |
307 | if (error) | 307 | if (error) |
308 | break; | 308 | break; |
309 | 309 | ||
310 | dev->pwr_domain = clknb->pwr_domain; | 310 | dev->pm_domain = clknb->pm_domain; |
311 | if (clknb->con_ids[0]) { | 311 | if (clknb->con_ids[0]) { |
312 | for (con_id = clknb->con_ids; *con_id; con_id++) | 312 | for (con_id = clknb->con_ids; *con_id; con_id++) |
313 | pm_runtime_clk_add(dev, *con_id); | 313 | pm_runtime_clk_add(dev, *con_id); |
@@ -317,10 +317,10 @@ static int pm_runtime_clk_notify(struct notifier_block *nb, | |||
317 | 317 | ||
318 | break; | 318 | break; |
319 | case BUS_NOTIFY_DEL_DEVICE: | 319 | case BUS_NOTIFY_DEL_DEVICE: |
320 | if (dev->pwr_domain != clknb->pwr_domain) | 320 | if (dev->pm_domain != clknb->pm_domain) |
321 | break; | 321 | break; |
322 | 322 | ||
323 | dev->pwr_domain = NULL; | 323 | dev->pm_domain = NULL; |
324 | pm_runtime_clk_destroy(dev); | 324 | pm_runtime_clk_destroy(dev); |
325 | break; | 325 | break; |
326 | } | 326 | } |