diff options
-rw-r--r-- | drivers/media/video/via-camera.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2100.c | 2 | ||||
-rw-r--r-- | include/linux/netdevice.h | 2 | ||||
-rw-r--r-- | include/linux/pm_qos.h | 22 | ||||
-rw-r--r-- | include/sound/pcm.h | 2 | ||||
-rw-r--r-- | kernel/power/qos.c | 88 |
6 files changed, 59 insertions, 59 deletions
diff --git a/drivers/media/video/via-camera.c b/drivers/media/video/via-camera.c index b3ca3893f3de..fba6c6458cf9 100644 --- a/drivers/media/video/via-camera.c +++ b/drivers/media/video/via-camera.c | |||
@@ -69,7 +69,7 @@ struct via_camera { | |||
69 | struct mutex lock; | 69 | struct mutex lock; |
70 | enum viacam_opstate opstate; | 70 | enum viacam_opstate opstate; |
71 | unsigned long flags; | 71 | unsigned long flags; |
72 | struct pm_qos_request_list qos_request; | 72 | struct pm_qos_request qos_request; |
73 | /* | 73 | /* |
74 | * GPIO info for power/reset management | 74 | * GPIO info for power/reset management |
75 | */ | 75 | */ |
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c index aaab76ce6020..db35f99cac14 100644 --- a/drivers/net/wireless/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/ipw2x00/ipw2100.c | |||
@@ -174,7 +174,7 @@ that only one external action is invoked at a time. | |||
174 | #define DRV_DESCRIPTION "Intel(R) PRO/Wireless 2100 Network Driver" | 174 | #define DRV_DESCRIPTION "Intel(R) PRO/Wireless 2100 Network Driver" |
175 | #define DRV_COPYRIGHT "Copyright(c) 2003-2006 Intel Corporation" | 175 | #define DRV_COPYRIGHT "Copyright(c) 2003-2006 Intel Corporation" |
176 | 176 | ||
177 | static struct pm_qos_request_list ipw2100_pm_qos_req; | 177 | static struct pm_qos_request ipw2100_pm_qos_req; |
178 | 178 | ||
179 | /* Debugging stuff */ | 179 | /* Debugging stuff */ |
180 | #ifdef CONFIG_IPW2100_DEBUG | 180 | #ifdef CONFIG_IPW2100_DEBUG |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index f72ac6b972b7..f38ab5b7e768 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -964,7 +964,7 @@ struct net_device { | |||
964 | */ | 964 | */ |
965 | char name[IFNAMSIZ]; | 965 | char name[IFNAMSIZ]; |
966 | 966 | ||
967 | struct pm_qos_request_list pm_qos_req; | 967 | struct pm_qos_request pm_qos_req; |
968 | 968 | ||
969 | /* device name hash chain */ | 969 | /* device name hash chain */ |
970 | struct hlist_node name_hlist; | 970 | struct hlist_node name_hlist; |
diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h index 7ba675413b08..6b0968f8bc6e 100644 --- a/include/linux/pm_qos.h +++ b/include/linux/pm_qos.h | |||
@@ -20,30 +20,30 @@ | |||
20 | #define PM_QOS_NETWORK_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) | 20 | #define PM_QOS_NETWORK_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) |
21 | #define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE 0 | 21 | #define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE 0 |
22 | 22 | ||
23 | struct pm_qos_request_list { | 23 | struct pm_qos_request { |
24 | struct plist_node list; | 24 | struct plist_node node; |
25 | int pm_qos_class; | 25 | int pm_qos_class; |
26 | }; | 26 | }; |
27 | 27 | ||
28 | #ifdef CONFIG_PM | 28 | #ifdef CONFIG_PM |
29 | void pm_qos_add_request(struct pm_qos_request_list *l, | 29 | void pm_qos_add_request(struct pm_qos_request *req, int pm_qos_class, |
30 | int pm_qos_class, s32 value); | 30 | s32 value); |
31 | void pm_qos_update_request(struct pm_qos_request_list *pm_qos_req, | 31 | void pm_qos_update_request(struct pm_qos_request *req, |
32 | s32 new_value); | 32 | s32 new_value); |
33 | void pm_qos_remove_request(struct pm_qos_request_list *pm_qos_req); | 33 | void pm_qos_remove_request(struct pm_qos_request *req); |
34 | 34 | ||
35 | int pm_qos_request(int pm_qos_class); | 35 | int pm_qos_request(int pm_qos_class); |
36 | int pm_qos_add_notifier(int pm_qos_class, struct notifier_block *notifier); | 36 | int pm_qos_add_notifier(int pm_qos_class, struct notifier_block *notifier); |
37 | int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier); | 37 | int pm_qos_remove_notifier(int pm_qos_class, struct notifier_block *notifier); |
38 | int pm_qos_request_active(struct pm_qos_request_list *req); | 38 | int pm_qos_request_active(struct pm_qos_request *req); |
39 | #else | 39 | #else |
40 | static inline void pm_qos_add_request(struct pm_qos_request_list *l, | 40 | static inline void pm_qos_add_request(struct pm_qos_request *req, |
41 | int pm_qos_class, s32 value) | 41 | int pm_qos_class, s32 value) |
42 | { return; } | 42 | { return; } |
43 | static inline void pm_qos_update_request(struct pm_qos_request_list *pm_qos_req, | 43 | static inline void pm_qos_update_request(struct pm_qos_request *req, |
44 | s32 new_value) | 44 | s32 new_value) |
45 | { return; } | 45 | { return; } |
46 | static inline void pm_qos_remove_request(struct pm_qos_request_list *pm_qos_req) | 46 | static inline void pm_qos_remove_request(struct pm_qos_request *req) |
47 | { return; } | 47 | { return; } |
48 | 48 | ||
49 | static inline int pm_qos_request(int pm_qos_class) | 49 | static inline int pm_qos_request(int pm_qos_class) |
@@ -54,7 +54,7 @@ static inline int pm_qos_add_notifier(int pm_qos_class, | |||
54 | static inline int pm_qos_remove_notifier(int pm_qos_class, | 54 | static inline int pm_qos_remove_notifier(int pm_qos_class, |
55 | struct notifier_block *notifier) | 55 | struct notifier_block *notifier) |
56 | { return 0; } | 56 | { return 0; } |
57 | static inline int pm_qos_request_active(struct pm_qos_request_list *req) | 57 | static inline int pm_qos_request_active(struct pm_qos_request *req) |
58 | { return 0; } | 58 | { return 0; } |
59 | #endif | 59 | #endif |
60 | 60 | ||
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 666ee91e8a2e..54cb079b7bf1 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -373,7 +373,7 @@ struct snd_pcm_substream { | |||
373 | int number; | 373 | int number; |
374 | char name[32]; /* substream name */ | 374 | char name[32]; /* substream name */ |
375 | int stream; /* stream (direction) */ | 375 | int stream; /* stream (direction) */ |
376 | struct pm_qos_request_list latency_pm_qos_req; /* pm_qos request */ | 376 | struct pm_qos_request latency_pm_qos_req; /* pm_qos request */ |
377 | size_t buffer_bytes_max; /* limit ring buffer size */ | 377 | size_t buffer_bytes_max; /* limit ring buffer size */ |
378 | struct snd_dma_buffer dma_buffer; | 378 | struct snd_dma_buffer dma_buffer; |
379 | unsigned int dma_buf_id; | 379 | unsigned int dma_buf_id; |
diff --git a/kernel/power/qos.c b/kernel/power/qos.c index 61b47384329e..aa52c44e6080 100644 --- a/kernel/power/qos.c +++ b/kernel/power/qos.c | |||
@@ -45,7 +45,7 @@ | |||
45 | #include <linux/uaccess.h> | 45 | #include <linux/uaccess.h> |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * locking rule: all changes to requests or notifiers lists | 48 | * locking rule: all changes to constraints or notifiers lists |
49 | * or pm_qos_object list and pm_qos_objects need to happen with pm_qos_lock | 49 | * or pm_qos_object list and pm_qos_objects need to happen with pm_qos_lock |
50 | * held, taken with _irqsave. One lock to rule them all | 50 | * held, taken with _irqsave. One lock to rule them all |
51 | */ | 51 | */ |
@@ -60,7 +60,7 @@ enum pm_qos_type { | |||
60 | * types linux supports for 32 bit quantites | 60 | * types linux supports for 32 bit quantites |
61 | */ | 61 | */ |
62 | struct pm_qos_object { | 62 | struct pm_qos_object { |
63 | struct plist_head requests; | 63 | struct plist_head constraints; |
64 | struct blocking_notifier_head *notifiers; | 64 | struct blocking_notifier_head *notifiers; |
65 | struct miscdevice pm_qos_power_miscdev; | 65 | struct miscdevice pm_qos_power_miscdev; |
66 | char *name; | 66 | char *name; |
@@ -74,7 +74,7 @@ static DEFINE_SPINLOCK(pm_qos_lock); | |||
74 | static struct pm_qos_object null_pm_qos; | 74 | static struct pm_qos_object null_pm_qos; |
75 | static BLOCKING_NOTIFIER_HEAD(cpu_dma_lat_notifier); | 75 | static BLOCKING_NOTIFIER_HEAD(cpu_dma_lat_notifier); |
76 | static struct pm_qos_object cpu_dma_pm_qos = { | 76 | static struct pm_qos_object cpu_dma_pm_qos = { |
77 | .requests = PLIST_HEAD_INIT(cpu_dma_pm_qos.requests), | 77 | .constraints = PLIST_HEAD_INIT(cpu_dma_pm_qos.constraints), |
78 | .notifiers = &cpu_dma_lat_notifier, | 78 | .notifiers = &cpu_dma_lat_notifier, |
79 | .name = "cpu_dma_latency", | 79 | .name = "cpu_dma_latency", |
80 | .target_value = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE, | 80 | .target_value = PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE, |
@@ -84,7 +84,7 @@ static struct pm_qos_object cpu_dma_pm_qos = { | |||
84 | 84 | ||
85 | static BLOCKING_NOTIFIER_HEAD(network_lat_notifier); | 85 | static BLOCKING_NOTIFIER_HEAD(network_lat_notifier); |
86 | static struct pm_qos_object network_lat_pm_qos = { | 86 | static struct pm_qos_object network_lat_pm_qos = { |
87 | .requests = PLIST_HEAD_INIT(network_lat_pm_qos.requests), | 87 | .constraints = PLIST_HEAD_INIT(network_lat_pm_qos.constraints), |
88 | .notifiers = &network_lat_notifier, | 88 | .notifiers = &network_lat_notifier, |
89 | .name = "network_latency", | 89 | .name = "network_latency", |
90 | .target_value = PM_QOS_NETWORK_LAT_DEFAULT_VALUE, | 90 | .target_value = PM_QOS_NETWORK_LAT_DEFAULT_VALUE, |
@@ -95,7 +95,7 @@ static struct pm_qos_object network_lat_pm_qos = { | |||
95 | 95 | ||
96 | static BLOCKING_NOTIFIER_HEAD(network_throughput_notifier); | 96 | static BLOCKING_NOTIFIER_HEAD(network_throughput_notifier); |
97 | static struct pm_qos_object network_throughput_pm_qos = { | 97 | static struct pm_qos_object network_throughput_pm_qos = { |
98 | .requests = PLIST_HEAD_INIT(network_throughput_pm_qos.requests), | 98 | .constraints = PLIST_HEAD_INIT(network_throughput_pm_qos.constraints), |
99 | .notifiers = &network_throughput_notifier, | 99 | .notifiers = &network_throughput_notifier, |
100 | .name = "network_throughput", | 100 | .name = "network_throughput", |
101 | .target_value = PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE, | 101 | .target_value = PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE, |
@@ -129,15 +129,15 @@ static const struct file_operations pm_qos_power_fops = { | |||
129 | /* unlocked internal variant */ | 129 | /* unlocked internal variant */ |
130 | static inline int pm_qos_get_value(struct pm_qos_object *o) | 130 | static inline int pm_qos_get_value(struct pm_qos_object *o) |
131 | { | 131 | { |
132 | if (plist_head_empty(&o->requests)) | 132 | if (plist_head_empty(&o->constraints)) |
133 | return o->default_value; | 133 | return o->default_value; |
134 | 134 | ||
135 | switch (o->type) { | 135 | switch (o->type) { |
136 | case PM_QOS_MIN: | 136 | case PM_QOS_MIN: |
137 | return plist_first(&o->requests)->prio; | 137 | return plist_first(&o->constraints)->prio; |
138 | 138 | ||
139 | case PM_QOS_MAX: | 139 | case PM_QOS_MAX: |
140 | return plist_last(&o->requests)->prio; | 140 | return plist_last(&o->constraints)->prio; |
141 | 141 | ||
142 | default: | 142 | default: |
143 | /* runtime check for not using enum */ | 143 | /* runtime check for not using enum */ |
@@ -170,13 +170,13 @@ static void update_target(struct pm_qos_object *o, struct plist_node *node, | |||
170 | * with new value and add, then see if the extremal | 170 | * with new value and add, then see if the extremal |
171 | * changed | 171 | * changed |
172 | */ | 172 | */ |
173 | plist_del(node, &o->requests); | 173 | plist_del(node, &o->constraints); |
174 | plist_node_init(node, value); | 174 | plist_node_init(node, value); |
175 | plist_add(node, &o->requests); | 175 | plist_add(node, &o->constraints); |
176 | } else if (del) { | 176 | } else if (del) { |
177 | plist_del(node, &o->requests); | 177 | plist_del(node, &o->constraints); |
178 | } else { | 178 | } else { |
179 | plist_add(node, &o->requests); | 179 | plist_add(node, &o->constraints); |
180 | } | 180 | } |
181 | curr_value = pm_qos_get_value(o); | 181 | curr_value = pm_qos_get_value(o); |
182 | pm_qos_set_value(o, curr_value); | 182 | pm_qos_set_value(o, curr_value); |
@@ -222,7 +222,7 @@ int pm_qos_request(int pm_qos_class) | |||
222 | } | 222 | } |
223 | EXPORT_SYMBOL_GPL(pm_qos_request); | 223 | EXPORT_SYMBOL_GPL(pm_qos_request); |
224 | 224 | ||
225 | int pm_qos_request_active(struct pm_qos_request_list *req) | 225 | int pm_qos_request_active(struct pm_qos_request *req) |
226 | { | 226 | { |
227 | return req->pm_qos_class != 0; | 227 | return req->pm_qos_class != 0; |
228 | } | 228 | } |
@@ -230,24 +230,24 @@ EXPORT_SYMBOL_GPL(pm_qos_request_active); | |||
230 | 230 | ||
231 | /** | 231 | /** |
232 | * pm_qos_add_request - inserts new qos request into the list | 232 | * pm_qos_add_request - inserts new qos request into the list |
233 | * @dep: pointer to a preallocated handle | 233 | * @req: pointer to a preallocated handle |
234 | * @pm_qos_class: identifies which list of qos request to use | 234 | * @pm_qos_class: identifies which list of qos request to use |
235 | * @value: defines the qos request | 235 | * @value: defines the qos request |
236 | * | 236 | * |
237 | * This function inserts a new entry in the pm_qos_class list of requested qos | 237 | * This function inserts a new entry in the pm_qos_class list of requested qos |
238 | * performance characteristics. It recomputes the aggregate QoS expectations | 238 | * performance characteristics. It recomputes the aggregate QoS expectations |
239 | * for the pm_qos_class of parameters and initializes the pm_qos_request_list | 239 | * for the pm_qos_class of parameters and initializes the pm_qos_request |
240 | * handle. Caller needs to save this handle for later use in updates and | 240 | * handle. Caller needs to save this handle for later use in updates and |
241 | * removal. | 241 | * removal. |
242 | */ | 242 | */ |
243 | 243 | ||
244 | void pm_qos_add_request(struct pm_qos_request_list *dep, | 244 | void pm_qos_add_request(struct pm_qos_request *req, |
245 | int pm_qos_class, s32 value) | 245 | int pm_qos_class, s32 value) |
246 | { | 246 | { |
247 | struct pm_qos_object *o = pm_qos_array[pm_qos_class]; | 247 | struct pm_qos_object *o = pm_qos_array[pm_qos_class]; |
248 | int new_value; | 248 | int new_value; |
249 | 249 | ||
250 | if (pm_qos_request_active(dep)) { | 250 | if (pm_qos_request_active(req)) { |
251 | WARN(1, KERN_ERR "pm_qos_add_request() called for already added request\n"); | 251 | WARN(1, KERN_ERR "pm_qos_add_request() called for already added request\n"); |
252 | return; | 252 | return; |
253 | } | 253 | } |
@@ -255,15 +255,15 @@ void pm_qos_add_request(struct pm_qos_request_list *dep, | |||
255 | new_value = o->default_value; | 255 | new_value = o->default_value; |
256 | else | 256 | else |
257 | new_value = value; | 257 | new_value = value; |
258 | plist_node_init(&dep->list, new_value); | 258 | plist_node_init(&req->node, new_value); |
259 | dep->pm_qos_class = pm_qos_class; | 259 | req->pm_qos_class = pm_qos_class; |
260 | update_target(o, &dep->list, 0, PM_QOS_DEFAULT_VALUE); | 260 | update_target(o, &req->node, 0, PM_QOS_DEFAULT_VALUE); |
261 | } | 261 | } |
262 | EXPORT_SYMBOL_GPL(pm_qos_add_request); | 262 | EXPORT_SYMBOL_GPL(pm_qos_add_request); |
263 | 263 | ||
264 | /** | 264 | /** |
265 | * pm_qos_update_request - modifies an existing qos request | 265 | * pm_qos_update_request - modifies an existing qos request |
266 | * @pm_qos_req : handle to list element holding a pm_qos request to use | 266 | * @req : handle to list element holding a pm_qos request to use |
267 | * @value: defines the qos request | 267 | * @value: defines the qos request |
268 | * | 268 | * |
269 | * Updates an existing qos request for the pm_qos_class of parameters along | 269 | * Updates an existing qos request for the pm_qos_class of parameters along |
@@ -271,56 +271,56 @@ EXPORT_SYMBOL_GPL(pm_qos_add_request); | |||
271 | * | 271 | * |
272 | * Attempts are made to make this code callable on hot code paths. | 272 | * Attempts are made to make this code callable on hot code paths. |
273 | */ | 273 | */ |
274 | void pm_qos_update_request(struct pm_qos_request_list *pm_qos_req, | 274 | void pm_qos_update_request(struct pm_qos_request *req, |
275 | s32 new_value) | 275 | s32 new_value) |
276 | { | 276 | { |
277 | s32 temp; | 277 | s32 temp; |
278 | struct pm_qos_object *o; | 278 | struct pm_qos_object *o; |
279 | 279 | ||
280 | if (!pm_qos_req) /*guard against callers passing in null */ | 280 | if (!req) /*guard against callers passing in null */ |
281 | return; | 281 | return; |
282 | 282 | ||
283 | if (!pm_qos_request_active(pm_qos_req)) { | 283 | if (!pm_qos_request_active(req)) { |
284 | WARN(1, KERN_ERR "pm_qos_update_request() called for unknown object\n"); | 284 | WARN(1, KERN_ERR "pm_qos_update_request() called for unknown object\n"); |
285 | return; | 285 | return; |
286 | } | 286 | } |
287 | 287 | ||
288 | o = pm_qos_array[pm_qos_req->pm_qos_class]; | 288 | o = pm_qos_array[req->pm_qos_class]; |
289 | 289 | ||
290 | if (new_value == PM_QOS_DEFAULT_VALUE) | 290 | if (new_value == PM_QOS_DEFAULT_VALUE) |
291 | temp = o->default_value; | 291 | temp = o->default_value; |
292 | else | 292 | else |
293 | temp = new_value; | 293 | temp = new_value; |
294 | 294 | ||
295 | if (temp != pm_qos_req->list.prio) | 295 | if (temp != req->node.prio) |
296 | update_target(o, &pm_qos_req->list, 0, temp); | 296 | update_target(o, &req->node, 0, temp); |
297 | } | 297 | } |
298 | EXPORT_SYMBOL_GPL(pm_qos_update_request); | 298 | EXPORT_SYMBOL_GPL(pm_qos_update_request); |
299 | 299 | ||
300 | /** | 300 | /** |
301 | * pm_qos_remove_request - modifies an existing qos request | 301 | * pm_qos_remove_request - modifies an existing qos request |
302 | * @pm_qos_req: handle to request list element | 302 | * @req: handle to request list element |
303 | * | 303 | * |
304 | * Will remove pm qos request from the list of requests and | 304 | * Will remove pm qos request from the list of constraints and |
305 | * recompute the current target value for the pm_qos_class. Call this | 305 | * recompute the current target value for the pm_qos_class. Call this |
306 | * on slow code paths. | 306 | * on slow code paths. |
307 | */ | 307 | */ |
308 | void pm_qos_remove_request(struct pm_qos_request_list *pm_qos_req) | 308 | void pm_qos_remove_request(struct pm_qos_request *req) |
309 | { | 309 | { |
310 | struct pm_qos_object *o; | 310 | struct pm_qos_object *o; |
311 | 311 | ||
312 | if (pm_qos_req == NULL) | 312 | if (req == NULL) |
313 | return; | 313 | return; |
314 | /* silent return to keep pcm code cleaner */ | 314 | /* silent return to keep pcm code cleaner */ |
315 | 315 | ||
316 | if (!pm_qos_request_active(pm_qos_req)) { | 316 | if (!pm_qos_request_active(req)) { |
317 | WARN(1, KERN_ERR "pm_qos_remove_request() called for unknown object\n"); | 317 | WARN(1, KERN_ERR "pm_qos_remove_request() called for unknown object\n"); |
318 | return; | 318 | return; |
319 | } | 319 | } |
320 | 320 | ||
321 | o = pm_qos_array[pm_qos_req->pm_qos_class]; | 321 | o = pm_qos_array[req->pm_qos_class]; |
322 | update_target(o, &pm_qos_req->list, 1, PM_QOS_DEFAULT_VALUE); | 322 | update_target(o, &req->node, 1, PM_QOS_DEFAULT_VALUE); |
323 | memset(pm_qos_req, 0, sizeof(*pm_qos_req)); | 323 | memset(req, 0, sizeof(*req)); |
324 | } | 324 | } |
325 | EXPORT_SYMBOL_GPL(pm_qos_remove_request); | 325 | EXPORT_SYMBOL_GPL(pm_qos_remove_request); |
326 | 326 | ||
@@ -368,7 +368,7 @@ static int pm_qos_power_open(struct inode *inode, struct file *filp) | |||
368 | 368 | ||
369 | pm_qos_class = find_pm_qos_object_by_minor(iminor(inode)); | 369 | pm_qos_class = find_pm_qos_object_by_minor(iminor(inode)); |
370 | if (pm_qos_class >= 0) { | 370 | if (pm_qos_class >= 0) { |
371 | struct pm_qos_request_list *req = kzalloc(sizeof(*req), GFP_KERNEL); | 371 | struct pm_qos_request *req = kzalloc(sizeof(*req), GFP_KERNEL); |
372 | if (!req) | 372 | if (!req) |
373 | return -ENOMEM; | 373 | return -ENOMEM; |
374 | 374 | ||
@@ -383,7 +383,7 @@ static int pm_qos_power_open(struct inode *inode, struct file *filp) | |||
383 | 383 | ||
384 | static int pm_qos_power_release(struct inode *inode, struct file *filp) | 384 | static int pm_qos_power_release(struct inode *inode, struct file *filp) |
385 | { | 385 | { |
386 | struct pm_qos_request_list *req; | 386 | struct pm_qos_request *req; |
387 | 387 | ||
388 | req = filp->private_data; | 388 | req = filp->private_data; |
389 | pm_qos_remove_request(req); | 389 | pm_qos_remove_request(req); |
@@ -399,14 +399,14 @@ static ssize_t pm_qos_power_read(struct file *filp, char __user *buf, | |||
399 | s32 value; | 399 | s32 value; |
400 | unsigned long flags; | 400 | unsigned long flags; |
401 | struct pm_qos_object *o; | 401 | struct pm_qos_object *o; |
402 | struct pm_qos_request_list *pm_qos_req = filp->private_data; | 402 | struct pm_qos_request *req = filp->private_data; |
403 | 403 | ||
404 | if (!pm_qos_req) | 404 | if (!req) |
405 | return -EINVAL; | 405 | return -EINVAL; |
406 | if (!pm_qos_request_active(pm_qos_req)) | 406 | if (!pm_qos_request_active(req)) |
407 | return -EINVAL; | 407 | return -EINVAL; |
408 | 408 | ||
409 | o = pm_qos_array[pm_qos_req->pm_qos_class]; | 409 | o = pm_qos_array[req->pm_qos_class]; |
410 | spin_lock_irqsave(&pm_qos_lock, flags); | 410 | spin_lock_irqsave(&pm_qos_lock, flags); |
411 | value = pm_qos_get_value(o); | 411 | value = pm_qos_get_value(o); |
412 | spin_unlock_irqrestore(&pm_qos_lock, flags); | 412 | spin_unlock_irqrestore(&pm_qos_lock, flags); |
@@ -418,7 +418,7 @@ static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf, | |||
418 | size_t count, loff_t *f_pos) | 418 | size_t count, loff_t *f_pos) |
419 | { | 419 | { |
420 | s32 value; | 420 | s32 value; |
421 | struct pm_qos_request_list *pm_qos_req; | 421 | struct pm_qos_request *req; |
422 | 422 | ||
423 | if (count == sizeof(s32)) { | 423 | if (count == sizeof(s32)) { |
424 | if (copy_from_user(&value, buf, sizeof(s32))) | 424 | if (copy_from_user(&value, buf, sizeof(s32))) |
@@ -449,8 +449,8 @@ static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf, | |||
449 | return -EINVAL; | 449 | return -EINVAL; |
450 | } | 450 | } |
451 | 451 | ||
452 | pm_qos_req = filp->private_data; | 452 | req = filp->private_data; |
453 | pm_qos_update_request(pm_qos_req, value); | 453 | pm_qos_update_request(req, value); |
454 | 454 | ||
455 | return count; | 455 | return count; |
456 | } | 456 | } |