diff options
| author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2026-04-29 18:34:43 +0900 |
|---|---|---|
| committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2026-04-29 20:30:33 +0900 |
| commit | 38fb1154185dfdd8ac2162da1da688f16ed66b9b (patch) | |
| tree | f9c8315afe01b76fd71ce253d37e60649900345e /drivers/firewire | |
| parent | e05a76ae1507d19d62eb0011592be9efb42e06cd (diff) | |
firewire: core: code refactoring to queue work item for iso_resource
The add_client_resource() function checks the type of client resource
every time to be called. If the type is for iso_resource, it schedules
work item.
However, the iso_resource client resource is only added by the call of
init_iso_resource(). There is no need to check the type every time adding
any client resource.
Link: https://lore.kernel.org/r/20260429093449.160545-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'drivers/firewire')
| -rw-r--r-- | drivers/firewire/core-cdev.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c index 144625c34be2..8391c7efab2c 100644 --- a/drivers/firewire/core-cdev.c +++ b/drivers/firewire/core-cdev.c @@ -526,8 +526,6 @@ static int add_client_resource(struct client *client, struct client_resource *re resource->handle = index; client_get(client); - if (is_iso_resource(resource)) - schedule_iso_resource(to_iso_resource(resource), 0); } return 0; @@ -1438,8 +1436,9 @@ static int init_iso_resource(struct client *client, } else { r->resource.release = NULL; r->resource.handle = -1; - schedule_iso_resource(r, 0); } + schedule_iso_resource(r, 0); + request->handle = r->resource.handle; return 0; |
