aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pm_qos.h
diff options
context:
space:
mode:
authorJean Pihet <jean.pihet@newoldbits.com>2012-02-13 10:23:42 -0500
committerRafael J. Wysocki <rjw@sisk.pl>2012-02-13 10:23:42 -0500
commita9b542ee607a8afafa9447292394959fc84ea650 (patch)
treecac94f0048dbf6475ab5dc2a3b803ab6a59d472a /include/linux/pm_qos.h
parent654b0c9627bc1b34cc21643afa8ac359c50db7d7 (diff)
PM / QoS: unconditionally build the feature
The PM QoS feature originally didn't depend on CONFIG_PM, which was mistakenly changed by commit e8db0be1245de16a6cc6365506abc392c3c212d4 PM QoS: Move and rename the implementation files Later, commit d020283dc694c9ec31b410f522252f7a8397e67d PM / QoS: CPU C-state breakage with PM Qos change partially fixed that by introducing a static inline definition of pm_qos_request(), but that still didn't allow user space to use the PM QoS interface if CONFIG_PM was unset (which had been possible before). For this reason, remove the dependency of PM QoS on CONFIG_PM to make it work (as intended) with CONFIG_PM unset. [rjw: Replaced the original changelog with a new one.] Signed-off-by: Jean Pihet <j-pihet@ti.com> Reported-by: Venkatesh Pallipadi <venki@google.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'include/linux/pm_qos.h')
-rw-r--r--include/linux/pm_qos.h41
1 files changed, 1 insertions, 40 deletions
diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
index 67c521731f41..c8a541e13380 100644
--- a/include/linux/pm_qos.h
+++ b/include/linux/pm_qos.h
@@ -67,7 +67,6 @@ static inline int dev_pm_qos_request_active(struct dev_pm_qos_request *req)
67 return req->dev != 0; 67 return req->dev != 0;
68} 68}
69 69
70#ifdef CONFIG_PM
71int pm_qos_update_target(struct pm_qos_constraints *c, struct plist_node *node, 70int pm_qos_update_target(struct pm_qos_constraints *c, struct plist_node *node,
72 enum pm_qos_req_action action, int value); 71 enum pm_qos_req_action action, int value);
73void pm_qos_add_request(struct pm_qos_request *req, int pm_qos_class, 72void pm_qos_add_request(struct pm_qos_request *req, int pm_qos_class,
@@ -82,6 +81,7 @@ int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier);
82int pm_qos_request_active(struct pm_qos_request *req); 81int pm_qos_request_active(struct pm_qos_request *req);
83s32 pm_qos_read_value(struct pm_qos_constraints *c); 82s32 pm_qos_read_value(struct pm_qos_constraints *c);
84 83
84#ifdef CONFIG_PM
85s32 __dev_pm_qos_read_value(struct device *dev); 85s32 __dev_pm_qos_read_value(struct device *dev);
86s32 dev_pm_qos_read_value(struct device *dev); 86s32 dev_pm_qos_read_value(struct device *dev);
87int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req, 87int dev_pm_qos_add_request(struct device *dev, struct dev_pm_qos_request *req,
@@ -99,45 +99,6 @@ void dev_pm_qos_constraints_destroy(struct device *dev);
99int dev_pm_qos_add_ancestor_request(struct device *dev, 99int dev_pm_qos_add_ancestor_request(struct device *dev,
100 struct dev_pm_qos_request *req, s32 value); 100 struct dev_pm_qos_request *req, s32 value);
101#else 101#else
102static inline int pm_qos_update_target(struct pm_qos_constraints *c,
103 struct plist_node *node,
104 enum pm_qos_req_action action,
105 int value)
106 { return 0; }
107static inline void pm_qos_add_request(struct pm_qos_request *req,
108 int pm_qos_class, s32 value)
109 { return; }
110static inline void pm_qos_update_request(struct pm_qos_request *req,
111 s32 new_value)
112 { return; }
113static inline void pm_qos_remove_request(struct pm_qos_request *req)
114 { return; }
115
116static inline int pm_qos_request(int pm_qos_class)
117{
118 switch (pm_qos_class) {
119 case PM_QOS_CPU_DMA_LATENCY:
120 return PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE;
121 case PM_QOS_NETWORK_LATENCY:
122 return PM_QOS_NETWORK_LAT_DEFAULT_VALUE;
123 case PM_QOS_NETWORK_THROUGHPUT:
124 return PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE;
125 default:
126 return PM_QOS_DEFAULT_VALUE;
127 }
128}
129
130static inline int pm_qos_add_notifier(int pm_qos_class,
131 struct notifier_block *notifier)
132 { return 0; }
133static inline int pm_qos_remove_notifier(int pm_qos_class,
134 struct notifier_block *notifier)
135 { return 0; }
136static inline int pm_qos_request_active(struct pm_qos_request *req)
137 { return 0; }
138static inline s32 pm_qos_read_value(struct pm_qos_constraints *c)
139 { return 0; }
140
141static inline s32 __dev_pm_qos_read_value(struct device *dev) 102static inline s32 __dev_pm_qos_read_value(struct device *dev)
142 { return 0; } 103 { return 0; }
143static inline s32 dev_pm_qos_read_value(struct device *dev) 104static inline s32 dev_pm_qos_read_value(struct device *dev)