Skip to content

Commit

Permalink
PM / Domains: Fix include for PM_GENERIC_DOMAINS=n case
Browse files Browse the repository at this point in the history
Fix pm_genpd_init() arguments and make sure dev_gpd_data() and
simple_qos_governor exist regardless of CONFIG_PM_GENERIC_DOMAINS
setting.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
  • Loading branch information
Magnus Damm authored and Rafael J. Wysocki committed Mar 4, 2012
1 parent 9b4f617 commit b642631
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions include/linux/pm_domain.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ extern bool default_stop_ok(struct device *dev);
extern struct dev_power_governor pm_domain_always_on_gov;
#else

static inline struct generic_pm_domain_data *dev_gpd_data(struct device *dev)
{
return ERR_PTR(-ENOSYS);
}
static inline struct generic_pm_domain *dev_to_genpd(struct device *dev)
{
return ERR_PTR(-ENOSYS);
Expand Down Expand Up @@ -195,7 +199,8 @@ static inline int __pm_genpd_remove_callbacks(struct device *dev, bool clear_td)
{
return -ENOSYS;
}
static inline void pm_genpd_init(struct generic_pm_domain *genpd, bool is_off)
static inline void pm_genpd_init(struct generic_pm_domain *genpd,
struct dev_power_governor *gov, bool is_off)
{
}
static inline int pm_genpd_poweron(struct generic_pm_domain *genpd)
Expand All @@ -206,11 +211,8 @@ static inline bool default_stop_ok(struct device *dev)
{
return false;
}
#define simple_qos_governor NULL
#define pm_domain_always_on_gov NULL
static inline struct generic_pm_domain_data *dev_gpd_data(struct device *dev)
{
return NULL;
}
#endif

static inline int pm_genpd_remove_callbacks(struct device *dev)
Expand Down

0 comments on commit b642631

Please sign in to comment.