Skip to content

Commit

Permalink
PM / Domains: Fix build warning for CONFIG_PM_RUNTIME unset
Browse files Browse the repository at this point in the history
The functions genpd_save_dev() and genpd_restore_dev() are not used
for CONFIG_PM_RUNTIME unset, so move them under an appropriate
#ifdef.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
  • Loading branch information
Rafael J. Wysocki committed Jul 12, 2012
1 parent db79e53 commit 8e9afaf
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions drivers/base/power/domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,6 @@ static int genpd_start_dev(struct generic_pm_domain *genpd, struct device *dev)
start_latency_ns, "start");
}

static int genpd_save_dev(struct generic_pm_domain *genpd, struct device *dev)
{
return GENPD_DEV_TIMED_CALLBACK(genpd, int, save_state, dev,
save_state_latency_ns, "state save");
}

static int genpd_restore_dev(struct generic_pm_domain *genpd, struct device *dev)
{
return GENPD_DEV_TIMED_CALLBACK(genpd, int, restore_state, dev,
restore_state_latency_ns,
"state restore");
}

static bool genpd_sd_counter_dec(struct generic_pm_domain *genpd)
{
bool ret = false;
Expand Down Expand Up @@ -273,6 +260,19 @@ int pm_genpd_poweron(struct generic_pm_domain *genpd)

#ifdef CONFIG_PM_RUNTIME

static int genpd_save_dev(struct generic_pm_domain *genpd, struct device *dev)
{
return GENPD_DEV_TIMED_CALLBACK(genpd, int, save_state, dev,
save_state_latency_ns, "state save");
}

static int genpd_restore_dev(struct generic_pm_domain *genpd, struct device *dev)
{
return GENPD_DEV_TIMED_CALLBACK(genpd, int, restore_state, dev,
restore_state_latency_ns,
"state restore");
}

static int genpd_dev_pm_qos_notifier(struct notifier_block *nb,
unsigned long val, void *ptr)
{
Expand Down

0 comments on commit 8e9afaf

Please sign in to comment.