mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-07-05 13:25:20 +02:00
firewire: core: add helper function to detect data of iso resource structure
It depends on the function assigned to release member to identify resource structure. This commit adds a helper function to identify iso_resource structure. Link: https://lore.kernel.org/r/20240812235210.28458-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
This commit is contained in:
parent
ced2da31b8
commit
58ee62c290
|
@ -161,6 +161,11 @@ static struct iso_resource *to_iso_resource(struct client_resource *resource)
|
||||||
|
|
||||||
static void release_iso_resource(struct client *, struct client_resource *);
|
static void release_iso_resource(struct client *, struct client_resource *);
|
||||||
|
|
||||||
|
static int is_iso_resource(const struct client_resource *resource)
|
||||||
|
{
|
||||||
|
return resource->release == release_iso_resource;
|
||||||
|
}
|
||||||
|
|
||||||
static void schedule_iso_resource(struct iso_resource *r, unsigned long delay)
|
static void schedule_iso_resource(struct iso_resource *r, unsigned long delay)
|
||||||
{
|
{
|
||||||
client_get(r->client);
|
client_get(r->client);
|
||||||
|
@ -170,7 +175,7 @@ static void schedule_iso_resource(struct iso_resource *r, unsigned long delay)
|
||||||
|
|
||||||
static void schedule_if_iso_resource(struct client_resource *resource)
|
static void schedule_if_iso_resource(struct client_resource *resource)
|
||||||
{
|
{
|
||||||
if (resource->release == release_iso_resource)
|
if (is_iso_resource(resource))
|
||||||
schedule_iso_resource(to_iso_resource(resource), 0);
|
schedule_iso_resource(to_iso_resource(resource), 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user