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-driver.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-driver.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-driver.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c index 49b1c3d7b1a8..79750208e042 100644 --- a/drivers/media/video/cx18/cx18-driver.c +++ b/drivers/media/video/cx18/cx18-driver.c | |||
@@ -562,16 +562,18 @@ static int __devinit cx18_init_struct1(struct cx18 *cx) | |||
562 | mutex_init(&cx->epu2apu_mb_lock); | 562 | mutex_init(&cx->epu2apu_mb_lock); |
563 | mutex_init(&cx->epu2cpu_mb_lock); | 563 | mutex_init(&cx->epu2cpu_mb_lock); |
564 | 564 | ||
565 | cx->work_queue = create_singlethread_workqueue(cx->v4l2_dev.name); | 565 | snprintf(cx->in_workq_name, sizeof(cx->in_workq_name), "%s-in", |
566 | if (cx->work_queue == NULL) { | 566 | cx->v4l2_dev.name); |
567 | CX18_ERR("Unable to create work hander thread\n"); | 567 | cx->in_work_queue = create_singlethread_workqueue(cx->in_workq_name); |
568 | if (cx->in_work_queue == NULL) { | ||
569 | CX18_ERR("Unable to create incoming mailbox handler thread\n"); | ||
568 | return -ENOMEM; | 570 | return -ENOMEM; |
569 | } | 571 | } |
570 | 572 | ||
571 | for (i = 0; i < CX18_MAX_EPU_WORK_ORDERS; i++) { | 573 | for (i = 0; i < CX18_MAX_IN_WORK_ORDERS; i++) { |
572 | cx->epu_work_order[i].cx = cx; | 574 | cx->in_work_order[i].cx = cx; |
573 | cx->epu_work_order[i].str = cx->epu_debug_str; | 575 | cx->in_work_order[i].str = cx->epu_debug_str; |
574 | INIT_WORK(&cx->epu_work_order[i].work, cx18_epu_work_handler); | 576 | INIT_WORK(&cx->in_work_order[i].work, cx18_in_work_handler); |
575 | } | 577 | } |
576 | 578 | ||
577 | /* start counting open_id at 1 */ | 579 | /* start counting open_id at 1 */ |
@@ -944,7 +946,7 @@ free_map: | |||
944 | free_mem: | 946 | free_mem: |
945 | release_mem_region(cx->base_addr, CX18_MEM_SIZE); | 947 | release_mem_region(cx->base_addr, CX18_MEM_SIZE); |
946 | free_workqueue: | 948 | free_workqueue: |
947 | destroy_workqueue(cx->work_queue); | 949 | destroy_workqueue(cx->in_work_queue); |
948 | err: | 950 | err: |
949 | if (retval == 0) | 951 | if (retval == 0) |
950 | retval = -ENODEV; | 952 | retval = -ENODEV; |
@@ -1053,11 +1055,11 @@ int cx18_init_on_first_open(struct cx18 *cx) | |||
1053 | return 0; | 1055 | return 0; |
1054 | } | 1056 | } |
1055 | 1057 | ||
1056 | static void cx18_cancel_epu_work_orders(struct cx18 *cx) | 1058 | static void cx18_cancel_in_work_orders(struct cx18 *cx) |
1057 | { | 1059 | { |
1058 | int i; | 1060 | int i; |
1059 | for (i = 0; i < CX18_MAX_EPU_WORK_ORDERS; i++) | 1061 | for (i = 0; i < CX18_MAX_IN_WORK_ORDERS; i++) |
1060 | cancel_work_sync(&cx->epu_work_order[i].work); | 1062 | cancel_work_sync(&cx->in_work_order[i].work); |
1061 | } | 1063 | } |
1062 | 1064 | ||
1063 | static void cx18_remove(struct pci_dev *pci_dev) | 1065 | static void cx18_remove(struct pci_dev *pci_dev) |
@@ -1079,9 +1081,9 @@ static void cx18_remove(struct pci_dev *pci_dev) | |||
1079 | 1081 | ||
1080 | cx18_halt_firmware(cx); | 1082 | cx18_halt_firmware(cx); |
1081 | 1083 | ||
1082 | cx18_cancel_epu_work_orders(cx); | 1084 | cx18_cancel_in_work_orders(cx); |
1083 | 1085 | ||
1084 | destroy_workqueue(cx->work_queue); | 1086 | destroy_workqueue(cx->in_work_queue); |
1085 | 1087 | ||
1086 | cx18_streams_cleanup(cx, 1); | 1088 | cx18_streams_cleanup(cx, 1); |
1087 | 1089 | ||