summaryrefslogtreecommitdiff
path: root/drivers/firewire/core.h
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2024-09-04 21:51:51 +0900
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>2024-09-04 21:51:51 +0900
commit4f55ad754d6b7b6fa4ebcfd8c50f7e53e661a78e (patch)
tree09fa7e5c06e671d5f37ded9389f2198c4aa55937 /drivers/firewire/core.h
parentc6fb88a5270f4ba24859f5ecb61cfc731ef16300 (diff)
firewire: core: add local API to queue work item to workqueue specific to isochronous contexts
In the previous commit, the workqueue is added per the instance of fw_card structure for isochronous contexts. The workqueue is designed to be used by the implementation of fw_card_driver structure underlying the fw_card. This commit adds some local APIs to be used by the implementation. Tested-by: Edmund Raile <edmund.raile@protonmail.com> Link: https://lore.kernel.org/r/20240904125155.461886-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'drivers/firewire/core.h')
-rw-r--r--drivers/firewire/core.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/firewire/core.h b/drivers/firewire/core.h
index 96ae366889e0..2874f316156a 100644
--- a/drivers/firewire/core.h
+++ b/drivers/firewire/core.h
@@ -159,6 +159,16 @@ int fw_iso_buffer_alloc(struct fw_iso_buffer *buffer, int page_count);
int fw_iso_buffer_map_dma(struct fw_iso_buffer *buffer, struct fw_card *card,
enum dma_data_direction direction);
+static inline void fw_iso_context_init_work(struct fw_iso_context *ctx, work_func_t func)
+{
+ INIT_WORK(&ctx->work, func);
+}
+
+static inline void fw_iso_context_queue_work(struct fw_iso_context *ctx)
+{
+ queue_work(ctx->card->isoc_wq, &ctx->work);
+}
+
/* -topology */