diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-08-08 17:43:59 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-08-25 09:33:45 -0400 |
commit | bc0403ff16e5305c3a14c2b0826616ceaabbf058 (patch) | |
tree | 709b4e1c2cdbb33c075fc06d0598161952ab71d8 /drivers/base | |
parent | 17877eb5a900f32bb5827a7b2109b6c9adff5fc3 (diff) |
PM / Domains: Rename argument of pm_genpd_add_subdomain()
Change the name of the second argument of pm_genpd_add_subdomain()
so that it is (a) shorter and (b) in agreement with the name of
the second argument of pm_genpd_add_subdomain().
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/power/domain.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index c06f8f8717b9..1fc6cc9835ad 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c | |||
@@ -1178,36 +1178,36 @@ int pm_genpd_remove_device(struct generic_pm_domain *genpd, | |||
1178 | /** | 1178 | /** |
1179 | * pm_genpd_add_subdomain - Add a subdomain to an I/O PM domain. | 1179 | * pm_genpd_add_subdomain - Add a subdomain to an I/O PM domain. |
1180 | * @genpd: Master PM domain to add the subdomain to. | 1180 | * @genpd: Master PM domain to add the subdomain to. |
1181 | * @new_subdomain: Subdomain to be added. | 1181 | * @subdomain: Subdomain to be added. |
1182 | */ | 1182 | */ |
1183 | int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, | 1183 | int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, |
1184 | struct generic_pm_domain *new_subdomain) | 1184 | struct generic_pm_domain *subdomain) |
1185 | { | 1185 | { |
1186 | struct gpd_link *link; | 1186 | struct gpd_link *link; |
1187 | int ret = 0; | 1187 | int ret = 0; |
1188 | 1188 | ||
1189 | if (IS_ERR_OR_NULL(genpd) || IS_ERR_OR_NULL(new_subdomain)) | 1189 | if (IS_ERR_OR_NULL(genpd) || IS_ERR_OR_NULL(subdomain)) |
1190 | return -EINVAL; | 1190 | return -EINVAL; |
1191 | 1191 | ||
1192 | start: | 1192 | start: |
1193 | genpd_acquire_lock(genpd); | 1193 | genpd_acquire_lock(genpd); |
1194 | mutex_lock_nested(&new_subdomain->lock, SINGLE_DEPTH_NESTING); | 1194 | mutex_lock_nested(&subdomain->lock, SINGLE_DEPTH_NESTING); |
1195 | 1195 | ||
1196 | if (new_subdomain->status != GPD_STATE_POWER_OFF | 1196 | if (subdomain->status != GPD_STATE_POWER_OFF |
1197 | && new_subdomain->status != GPD_STATE_ACTIVE) { | 1197 | && subdomain->status != GPD_STATE_ACTIVE) { |
1198 | mutex_unlock(&new_subdomain->lock); | 1198 | mutex_unlock(&subdomain->lock); |
1199 | genpd_release_lock(genpd); | 1199 | genpd_release_lock(genpd); |
1200 | goto start; | 1200 | goto start; |
1201 | } | 1201 | } |
1202 | 1202 | ||
1203 | if (genpd->status == GPD_STATE_POWER_OFF | 1203 | if (genpd->status == GPD_STATE_POWER_OFF |
1204 | && new_subdomain->status != GPD_STATE_POWER_OFF) { | 1204 | && subdomain->status != GPD_STATE_POWER_OFF) { |
1205 | ret = -EINVAL; | 1205 | ret = -EINVAL; |
1206 | goto out; | 1206 | goto out; |
1207 | } | 1207 | } |
1208 | 1208 | ||
1209 | list_for_each_entry(link, &genpd->slave_links, slave_node) { | 1209 | list_for_each_entry(link, &genpd->slave_links, slave_node) { |
1210 | if (link->slave == new_subdomain && link->master == genpd) { | 1210 | if (link->slave == subdomain && link->master == genpd) { |
1211 | ret = -EINVAL; | 1211 | ret = -EINVAL; |
1212 | goto out; | 1212 | goto out; |
1213 | } | 1213 | } |
@@ -1220,13 +1220,13 @@ int pm_genpd_add_subdomain(struct generic_pm_domain *genpd, | |||
1220 | } | 1220 | } |
1221 | link->master = genpd; | 1221 | link->master = genpd; |
1222 | list_add_tail(&link->master_node, &genpd->master_links); | 1222 | list_add_tail(&link->master_node, &genpd->master_links); |
1223 | link->slave = new_subdomain; | 1223 | link->slave = subdomain; |
1224 | list_add_tail(&link->slave_node, &new_subdomain->slave_links); | 1224 | list_add_tail(&link->slave_node, &subdomain->slave_links); |
1225 | if (new_subdomain->status != GPD_STATE_POWER_OFF) | 1225 | if (subdomain->status != GPD_STATE_POWER_OFF) |
1226 | genpd_sd_counter_inc(genpd); | 1226 | genpd_sd_counter_inc(genpd); |
1227 | 1227 | ||
1228 | out: | 1228 | out: |
1229 | mutex_unlock(&new_subdomain->lock); | 1229 | mutex_unlock(&subdomain->lock); |
1230 | genpd_release_lock(genpd); | 1230 | genpd_release_lock(genpd); |
1231 | 1231 | ||
1232 | return ret; | 1232 | return ret; |