Skip to content

Commit

Permalink
PM / Domains: Remove pm_genpd_poweroff_unused() API
Browse files Browse the repository at this point in the history
As the last user of the pm_genpd_poweroff_unused() API has moved into
relying on genpd to deal with this internally from a late_initcall, let's
remove the API.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Ulf Hansson authored and Rafael J. Wysocki committed Oct 12, 2015
1 parent 2376692 commit bb4b72f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
10 changes: 3 additions & 7 deletions drivers/base/power/domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,15 +501,15 @@ static int __init pd_ignore_unused_setup(char *__unused)
__setup("pd_ignore_unused", pd_ignore_unused_setup);

/**
* pm_genpd_poweroff_unused - Power off all PM domains with no devices in use.
* genpd_poweroff_unused - Power off all PM domains with no devices in use.
*/
void pm_genpd_poweroff_unused(void)
static int __init genpd_poweroff_unused(void)
{
struct generic_pm_domain *genpd;

if (pd_ignore_unused) {
pr_warn("genpd: Not disabling unused power domains\n");
return;
return 0;
}

mutex_lock(&gpd_list_lock);
Expand All @@ -518,11 +518,7 @@ void pm_genpd_poweroff_unused(void)
genpd_queue_power_off_work(genpd);

mutex_unlock(&gpd_list_lock);
}

static int __init genpd_poweroff_unused(void)
{
pm_genpd_poweroff_unused();
return 0;
}
late_initcall(genpd_poweroff_unused);
Expand Down
3 changes: 0 additions & 3 deletions include/linux/pm_domain.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ extern int pm_genpd_remove_subdomain(struct generic_pm_domain *genpd,
struct generic_pm_domain *target);
extern void pm_genpd_init(struct generic_pm_domain *genpd,
struct dev_power_governor *gov, bool is_off);

extern int pm_genpd_poweron(struct generic_pm_domain *genpd);
extern void pm_genpd_poweroff_unused(void);

extern struct dev_power_governor simple_qos_governor;
extern struct dev_power_governor pm_domain_always_on_gov;
Expand Down Expand Up @@ -170,7 +168,6 @@ static inline int pm_genpd_poweron(struct generic_pm_domain *genpd)
{
return -ENOSYS;
}
static inline void pm_genpd_poweroff_unused(void) {}
#endif

static inline int pm_genpd_add_device(struct generic_pm_domain *genpd,
Expand Down

0 comments on commit bb4b72f

Please sign in to comment.