mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-18 23:18:20 +00:00
uwb: add pal parameter to new reservation callback
The pal parameter allows PALs to retrieve their PAL-specific data structure. Signed-off-by: David Vrabel <david.vrabel@csr.com>
This commit is contained in:
parent
58be81ed30
commit
e17be2b2a9
@ -558,7 +558,7 @@ static struct uwb_rsv *uwb_rsv_new_target(struct uwb_rc *rc,
|
|||||||
spin_lock(&rc->pal_lock);
|
spin_lock(&rc->pal_lock);
|
||||||
list_for_each_entry(pal, &rc->pals, node) {
|
list_for_each_entry(pal, &rc->pals, node) {
|
||||||
if (pal->new_rsv)
|
if (pal->new_rsv)
|
||||||
pal->new_rsv(rsv);
|
pal->new_rsv(pal, rsv);
|
||||||
if (rsv->state == UWB_RSV_STATE_T_ACCEPTED)
|
if (rsv->state == UWB_RSV_STATE_T_ACCEPTED)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -306,13 +306,13 @@ static struct file_operations drp_avail_fops = {
|
|||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void uwb_dbg_new_rsv(struct uwb_rsv *rsv)
|
static void uwb_dbg_new_rsv(struct uwb_pal *pal, struct uwb_rsv *rsv)
|
||||||
{
|
{
|
||||||
struct uwb_rc *rc = rsv->rc;
|
struct uwb_dbg *dbg = container_of(pal, struct uwb_dbg, pal);
|
||||||
|
|
||||||
if (rc->dbg->accept) {
|
if (dbg->accept) {
|
||||||
list_add_tail(&rsv->pal_node, &rc->dbg->rsvs);
|
list_add_tail(&rsv->pal_node, &dbg->rsvs);
|
||||||
uwb_rsv_accept(rsv, uwb_dbg_rsv_cb, NULL);
|
uwb_rsv_accept(rsv, uwb_dbg_rsv_cb, dbg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -405,7 +405,7 @@ struct uwb_pal {
|
|||||||
struct list_head node;
|
struct list_head node;
|
||||||
const char *name;
|
const char *name;
|
||||||
struct device *device;
|
struct device *device;
|
||||||
void (*new_rsv)(struct uwb_rsv *rsv);
|
void (*new_rsv)(struct uwb_pal *pal, struct uwb_rsv *rsv);
|
||||||
};
|
};
|
||||||
|
|
||||||
void uwb_pal_init(struct uwb_pal *pal);
|
void uwb_pal_init(struct uwb_pal *pal);
|
||||||
|
Loading…
Reference in New Issue
Block a user