summaryrefslogtreecommitdiff
path: root/drivers/firewire/core-cdev.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2026-05-20 22:08:38 +0900
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>2026-05-21 18:43:25 +0900
commit7cc812e634bdea9958606eaa9d5ba3e5ec52e6b7 (patch)
tree4af7bc387e97241a1b61356e0e7e3111a768a8cd /drivers/firewire/core-cdev.c
parent8208d94f149a53311ac7687c051cb3a6d58063f7 (diff)
downloadlinux-next-7cc812e634bdea9958606eaa9d5ba3e5ec52e6b7.tar.gz
linux-next-7cc812e634bdea9958606eaa9d5ba3e5ec52e6b7.zip
firewire: core: minor code refactoring for case-dependent parameters of iso resources management
The generation parameter is specific to the auto case of iso resources management, while it is in the common parameter structure. Move the generation member to the structure specific to auto case. Link: https://lore.kernel.org/r/20260520130840.629934-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'drivers/firewire/core-cdev.c')
-rw-r--r--drivers/firewire/core-cdev.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c
index c166e7617d2a..c669c9e42d34 100644
--- a/drivers/firewire/core-cdev.c
+++ b/drivers/firewire/core-cdev.c
@@ -129,7 +129,6 @@ struct descriptor_resource {
};
struct iso_resource_params {
- int generation;
u64 channels;
s32 bandwidth;
};
@@ -144,6 +143,7 @@ struct iso_resource_auto {
ISO_RES_AUTO_REALLOC,
ISO_RES_AUTO_DEALLOC,
} todo;
+ int generation;
struct iso_resource_params params;
struct iso_resource_event *e_alloc, *e_dealloc;
};
@@ -1316,7 +1316,6 @@ static int fill_iso_resource_params(struct iso_resource_params *params,
request->bandwidth > BANDWIDTH_AVAILABLE_INITIAL)
return -EINVAL;
- params->generation = -1;
params->channels = request->channels;
params->bandwidth = request->bandwidth;
@@ -1336,8 +1335,8 @@ static void iso_resource_auto_work(struct work_struct *work)
scoped_guard(spinlock_irq, &client->lock) {
reset_jiffies = client->device->card->reset_jiffies;
current_generation = client->device->generation;
- resource_generation = r->params.generation;
- r->params.generation = current_generation;
+ resource_generation = r->generation;
+ r->generation = current_generation;
todo = r->todo;
}
@@ -1495,7 +1494,6 @@ static void iso_resource_once_work(struct work_struct *work)
scoped_guard(spinlock_irq, &client->lock)
generation = client->device->generation;
- r->params.generation = generation;
bandwidth = r->params.bandwidth;
fw_iso_resource_manage(client->device->card, generation, r->params.channels, &channel,