diff options
| author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2026-01-17 23:28:14 +0900 |
|---|---|---|
| committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2026-01-18 17:18:48 +0900 |
| commit | 6b67470dce11cfaa09915cca8a5a807d3daf0b87 (patch) | |
| tree | 4bc1fbf8d93e1c267fc35f3132da9594a3229e0b /include | |
| parent | a4cd9860fa085f0d04d2065f4c151fcde9fcdf4a (diff) | |
firewire: core: add function variants for isochronous context creation
The fw_iso_callback union was added by a commit ebe4560ed5c ("firewire:
Remove function callback casts") to remove function pointer cast.
That change affected the cdev layer of the core code, but it is more
convenient for fw_iso_context_create() to accept the union directly.
This commit renames and changes the existing function to take the union
argument, and add static inline wrapper functions as variants.
Link: https://lore.kernel.org/r/20260117142823.440811-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/firewire.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index 09c8484f7430..68161b8a8a58 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h @@ -558,9 +558,8 @@ struct fw_iso_context { void *callback_data; }; -struct fw_iso_context *fw_iso_context_create(struct fw_card *card, - int type, int channel, int speed, size_t header_size, - fw_iso_callback_t callback, void *callback_data); +struct fw_iso_context *__fw_iso_context_create(struct fw_card *card, int type, int channel, + int speed, size_t header_size, union fw_iso_callback callback, void *callback_data); int fw_iso_context_set_channels(struct fw_iso_context *ctx, u64 *channels); int fw_iso_context_queue(struct fw_iso_context *ctx, struct fw_iso_packet *packet, @@ -569,6 +568,15 @@ int fw_iso_context_queue(struct fw_iso_context *ctx, void fw_iso_context_queue_flush(struct fw_iso_context *ctx); int fw_iso_context_flush_completions(struct fw_iso_context *ctx); +static inline struct fw_iso_context *fw_iso_context_create(struct fw_card *card, int type, + int channel, int speed, size_t header_size, fw_iso_callback_t callback, + void *callback_data) +{ + union fw_iso_callback cb = { .sc = callback }; + + return __fw_iso_context_create(card, type, channel, speed, header_size, cb, callback_data); +} + /** * fw_iso_context_schedule_flush_completions() - schedule work item to process isochronous context. * @ctx: the isochronous context |
