diff options
author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2012-02-04 16:26:49 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-02-09 17:57:15 -0500 |
commit | 9b4f617b1c2004332113b4a2c89dfb6e8029c987 (patch) | |
tree | 25487fc79c1e795397a1211baf8d3d195e826354 /include/linux/pm_domain.h | |
parent | dcaad77a8074b6de58e745546bc543d5538404f2 (diff) |
PM / Domains: Provide a dummy dev_gpd_data() when generic domains are 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>
Diffstat (limited to 'include/linux/pm_domain.h')
-rw-r--r-- | include/linux/pm_domain.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index e3ff87550eeb..e76cc9ae8233 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h | |||
@@ -101,12 +101,12 @@ struct generic_pm_domain_data { | |||
101 | bool need_restore; | 101 | bool need_restore; |
102 | }; | 102 | }; |
103 | 103 | ||
104 | #ifdef CONFIG_PM_GENERIC_DOMAINS | ||
104 | static inline struct generic_pm_domain_data *to_gpd_data(struct pm_domain_data *pdd) | 105 | static inline struct generic_pm_domain_data *to_gpd_data(struct pm_domain_data *pdd) |
105 | { | 106 | { |
106 | return container_of(pdd, struct generic_pm_domain_data, base); | 107 | return container_of(pdd, struct generic_pm_domain_data, base); |
107 | } | 108 | } |
108 | 109 | ||
109 | #ifdef CONFIG_PM_GENERIC_DOMAINS | ||
110 | static inline struct generic_pm_domain_data *dev_gpd_data(struct device *dev) | 110 | static inline struct generic_pm_domain_data *dev_gpd_data(struct device *dev) |
111 | { | 111 | { |
112 | return to_gpd_data(dev->power.subsys_data->domain_data); | 112 | return to_gpd_data(dev->power.subsys_data->domain_data); |
@@ -207,6 +207,10 @@ static inline bool default_stop_ok(struct device *dev) | |||
207 | return false; | 207 | return false; |
208 | } | 208 | } |
209 | #define pm_domain_always_on_gov NULL | 209 | #define pm_domain_always_on_gov NULL |
210 | static inline struct generic_pm_domain_data *dev_gpd_data(struct device *dev) | ||
211 | { | ||
212 | return NULL; | ||
213 | } | ||
210 | #endif | 214 | #endif |
211 | 215 | ||
212 | static inline int pm_genpd_remove_callbacks(struct device *dev) | 216 | static inline int pm_genpd_remove_callbacks(struct device *dev) |