Skip to content

Commit

Permalink
PM / Domains: Provide a dummy dev_gpd_data() when generic domains are…
Browse files Browse the repository at this point in the history
… not used

dev_gpd_data() is a generic macro, also useful for drivers. Hence it should
be available also when CONFIG_PM_GENERIC_DOMAINS is not selected. OTOH,
to_gpd_data() is so far unused outside of the generic PM domain code and
does not seem to be very useful without CONFIG_PM_GENERIC_DOMAINS.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
  • Loading branch information
Guennadi Liakhovetski authored and Rafael J. Wysocki committed Feb 9, 2012
1 parent dcaad77 commit 9b4f617
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion include/linux/pm_domain.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ struct generic_pm_domain_data {
bool need_restore;
};

#ifdef CONFIG_PM_GENERIC_DOMAINS
static inline struct generic_pm_domain_data *to_gpd_data(struct pm_domain_data *pdd)
{
return container_of(pdd, struct generic_pm_domain_data, base);
}

#ifdef CONFIG_PM_GENERIC_DOMAINS
static inline struct generic_pm_domain_data *dev_gpd_data(struct device *dev)
{
return to_gpd_data(dev->power.subsys_data->domain_data);
Expand Down Expand Up @@ -207,6 +207,10 @@ static inline bool default_stop_ok(struct device *dev)
return false;
}
#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 9b4f617

Please sign in to comment.