diff options
author | Andy Walls <awalls@radix.net> | 2009-04-13 21:22:40 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 17:20:44 -0400 |
commit | deed75ed9f7576ada4bca02e6c851833a352a38d (patch) | |
tree | bed238ee4fe2de5cae2784200fc9affe6d1cb920 /drivers/media/video/cx18/cx18-mailbox.c | |
parent | 56600093644c6929a7d1809dab5b8265532df045 (diff) |
V4L/DVB (11615): cx18: Rename the work queue to "in_work_queue"
Rename the work queue to "in_work_queue" to indicate it is handling
incoming mailbox commands. This is preparation for adding a work queue
for handling deferrable outgoing mailbox commands.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-mailbox.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-mailbox.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/media/video/cx18/cx18-mailbox.c b/drivers/media/video/cx18/cx18-mailbox.c index 2226e5791e9..2a4d4356d1b 100644 --- a/drivers/media/video/cx18/cx18-mailbox.c +++ b/drivers/media/video/cx18/cx18-mailbox.c | |||
@@ -131,7 +131,7 @@ static void dump_mb(struct cx18 *cx, struct cx18_mailbox *mb, char *name) | |||
131 | * Functions that run in a work_queue work handling context | 131 | * Functions that run in a work_queue work handling context |
132 | */ | 132 | */ |
133 | 133 | ||
134 | static void epu_dma_done(struct cx18 *cx, struct cx18_epu_work_order *order) | 134 | static void epu_dma_done(struct cx18 *cx, struct cx18_in_work_order *order) |
135 | { | 135 | { |
136 | u32 handle, mdl_ack_count, id; | 136 | u32 handle, mdl_ack_count, id; |
137 | struct cx18_mailbox *mb; | 137 | struct cx18_mailbox *mb; |
@@ -213,7 +213,7 @@ static void epu_dma_done(struct cx18 *cx, struct cx18_epu_work_order *order) | |||
213 | wake_up(&s->waitq); | 213 | wake_up(&s->waitq); |
214 | } | 214 | } |
215 | 215 | ||
216 | static void epu_debug(struct cx18 *cx, struct cx18_epu_work_order *order) | 216 | static void epu_debug(struct cx18 *cx, struct cx18_in_work_order *order) |
217 | { | 217 | { |
218 | char *p; | 218 | char *p; |
219 | char *str = order->str; | 219 | char *str = order->str; |
@@ -224,7 +224,7 @@ static void epu_debug(struct cx18 *cx, struct cx18_epu_work_order *order) | |||
224 | CX18_INFO("FW version: %s\n", p - 1); | 224 | CX18_INFO("FW version: %s\n", p - 1); |
225 | } | 225 | } |
226 | 226 | ||
227 | static void epu_cmd(struct cx18 *cx, struct cx18_epu_work_order *order) | 227 | static void epu_cmd(struct cx18 *cx, struct cx18_in_work_order *order) |
228 | { | 228 | { |
229 | switch (order->rpu) { | 229 | switch (order->rpu) { |
230 | case CPU: | 230 | case CPU: |
@@ -253,18 +253,18 @@ static void epu_cmd(struct cx18 *cx, struct cx18_epu_work_order *order) | |||
253 | } | 253 | } |
254 | 254 | ||
255 | static | 255 | static |
256 | void free_epu_work_order(struct cx18 *cx, struct cx18_epu_work_order *order) | 256 | void free_in_work_order(struct cx18 *cx, struct cx18_in_work_order *order) |
257 | { | 257 | { |
258 | atomic_set(&order->pending, 0); | 258 | atomic_set(&order->pending, 0); |
259 | } | 259 | } |
260 | 260 | ||
261 | void cx18_epu_work_handler(struct work_struct *work) | 261 | void cx18_in_work_handler(struct work_struct *work) |
262 | { | 262 | { |
263 | struct cx18_epu_work_order *order = | 263 | struct cx18_in_work_order *order = |
264 | container_of(work, struct cx18_epu_work_order, work); | 264 | container_of(work, struct cx18_in_work_order, work); |
265 | struct cx18 *cx = order->cx; | 265 | struct cx18 *cx = order->cx; |
266 | epu_cmd(cx, order); | 266 | epu_cmd(cx, order); |
267 | free_epu_work_order(cx, order); | 267 | free_in_work_order(cx, order); |
268 | } | 268 | } |
269 | 269 | ||
270 | 270 | ||
@@ -272,7 +272,7 @@ void cx18_epu_work_handler(struct work_struct *work) | |||
272 | * Functions that run in an interrupt handling context | 272 | * Functions that run in an interrupt handling context |
273 | */ | 273 | */ |
274 | 274 | ||
275 | static void mb_ack_irq(struct cx18 *cx, struct cx18_epu_work_order *order) | 275 | static void mb_ack_irq(struct cx18 *cx, struct cx18_in_work_order *order) |
276 | { | 276 | { |
277 | struct cx18_mailbox __iomem *ack_mb; | 277 | struct cx18_mailbox __iomem *ack_mb; |
278 | u32 ack_irq, req; | 278 | u32 ack_irq, req; |
@@ -308,7 +308,7 @@ static void mb_ack_irq(struct cx18 *cx, struct cx18_epu_work_order *order) | |||
308 | return; | 308 | return; |
309 | } | 309 | } |
310 | 310 | ||
311 | static int epu_dma_done_irq(struct cx18 *cx, struct cx18_epu_work_order *order) | 311 | static int epu_dma_done_irq(struct cx18 *cx, struct cx18_in_work_order *order) |
312 | { | 312 | { |
313 | u32 handle, mdl_ack_offset, mdl_ack_count; | 313 | u32 handle, mdl_ack_offset, mdl_ack_count; |
314 | struct cx18_mailbox *mb; | 314 | struct cx18_mailbox *mb; |
@@ -334,7 +334,7 @@ static int epu_dma_done_irq(struct cx18 *cx, struct cx18_epu_work_order *order) | |||
334 | } | 334 | } |
335 | 335 | ||
336 | static | 336 | static |
337 | int epu_debug_irq(struct cx18 *cx, struct cx18_epu_work_order *order) | 337 | int epu_debug_irq(struct cx18 *cx, struct cx18_in_work_order *order) |
338 | { | 338 | { |
339 | u32 str_offset; | 339 | u32 str_offset; |
340 | char *str = order->str; | 340 | char *str = order->str; |
@@ -355,7 +355,7 @@ int epu_debug_irq(struct cx18 *cx, struct cx18_epu_work_order *order) | |||
355 | } | 355 | } |
356 | 356 | ||
357 | static inline | 357 | static inline |
358 | int epu_cmd_irq(struct cx18 *cx, struct cx18_epu_work_order *order) | 358 | int epu_cmd_irq(struct cx18 *cx, struct cx18_in_work_order *order) |
359 | { | 359 | { |
360 | int ret = -1; | 360 | int ret = -1; |
361 | 361 | ||
@@ -387,12 +387,12 @@ int epu_cmd_irq(struct cx18 *cx, struct cx18_epu_work_order *order) | |||
387 | } | 387 | } |
388 | 388 | ||
389 | static inline | 389 | static inline |
390 | struct cx18_epu_work_order *alloc_epu_work_order_irq(struct cx18 *cx) | 390 | struct cx18_in_work_order *alloc_in_work_order_irq(struct cx18 *cx) |
391 | { | 391 | { |
392 | int i; | 392 | int i; |
393 | struct cx18_epu_work_order *order = NULL; | 393 | struct cx18_in_work_order *order = NULL; |
394 | 394 | ||
395 | for (i = 0; i < CX18_MAX_EPU_WORK_ORDERS; i++) { | 395 | for (i = 0; i < CX18_MAX_IN_WORK_ORDERS; i++) { |
396 | /* | 396 | /* |
397 | * We only need "pending" atomic to inspect its contents, | 397 | * We only need "pending" atomic to inspect its contents, |
398 | * and need not do a check and set because: | 398 | * and need not do a check and set because: |
@@ -401,8 +401,8 @@ struct cx18_epu_work_order *alloc_epu_work_order_irq(struct cx18 *cx) | |||
401 | * 2. "pending" is only set here, and we're serialized because | 401 | * 2. "pending" is only set here, and we're serialized because |
402 | * we're called in an IRQ handler context. | 402 | * we're called in an IRQ handler context. |
403 | */ | 403 | */ |
404 | if (atomic_read(&cx->epu_work_order[i].pending) == 0) { | 404 | if (atomic_read(&cx->in_work_order[i].pending) == 0) { |
405 | order = &cx->epu_work_order[i]; | 405 | order = &cx->in_work_order[i]; |
406 | atomic_set(&order->pending, 1); | 406 | atomic_set(&order->pending, 1); |
407 | break; | 407 | break; |
408 | } | 408 | } |
@@ -414,7 +414,7 @@ void cx18_api_epu_cmd_irq(struct cx18 *cx, int rpu) | |||
414 | { | 414 | { |
415 | struct cx18_mailbox __iomem *mb; | 415 | struct cx18_mailbox __iomem *mb; |
416 | struct cx18_mailbox *order_mb; | 416 | struct cx18_mailbox *order_mb; |
417 | struct cx18_epu_work_order *order; | 417 | struct cx18_in_work_order *order; |
418 | int submit; | 418 | int submit; |
419 | 419 | ||
420 | switch (rpu) { | 420 | switch (rpu) { |
@@ -428,7 +428,7 @@ void cx18_api_epu_cmd_irq(struct cx18 *cx, int rpu) | |||
428 | return; | 428 | return; |
429 | } | 429 | } |
430 | 430 | ||
431 | order = alloc_epu_work_order_irq(cx); | 431 | order = alloc_in_work_order_irq(cx); |
432 | if (order == NULL) { | 432 | if (order == NULL) { |
433 | CX18_WARN("Unable to find blank work order form to schedule " | 433 | CX18_WARN("Unable to find blank work order form to schedule " |
434 | "incoming mailbox command processing\n"); | 434 | "incoming mailbox command processing\n"); |
@@ -461,7 +461,7 @@ void cx18_api_epu_cmd_irq(struct cx18 *cx, int rpu) | |||
461 | */ | 461 | */ |
462 | submit = epu_cmd_irq(cx, order); | 462 | submit = epu_cmd_irq(cx, order); |
463 | if (submit > 0) { | 463 | if (submit > 0) { |
464 | queue_work(cx->work_queue, &order->work); | 464 | queue_work(cx->in_work_queue, &order->work); |
465 | } | 465 | } |
466 | } | 466 | } |
467 | 467 | ||