diff options
author | David Vrabel <david.vrabel@csr.com> | 2008-11-17 15:24:14 +0000 |
---|---|---|
committer | David Vrabel <david.vrabel@csr.com> | 2008-11-17 15:24:14 +0000 |
commit | e17be2b2a95b43fe0d5878adf330701bb7a77115 (patch) | |
tree | 90810d325dcdbf6fb73c16a6324cefa42a3e2e16 | |
parent | 58be81ed301d96045bca2b85f3b838910efcfde4 (diff) |
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>
-rw-r--r-- | drivers/uwb/rsv.c | 2 | ||||
-rw-r--r-- | drivers/uwb/uwb-debug.c | 10 | ||||
-rw-r--r-- | include/linux/uwb.h | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/uwb/rsv.c b/drivers/uwb/rsv.c index 3d76efe26ac..935d5b536db 100644 --- a/drivers/uwb/rsv.c +++ b/drivers/uwb/rsv.c @@ -558,7 +558,7 @@ static struct uwb_rsv *uwb_rsv_new_target(struct uwb_rc *rc, spin_lock(&rc->pal_lock); list_for_each_entry(pal, &rc->pals, node) { if (pal->new_rsv) - pal->new_rsv(rsv); + pal->new_rsv(pal, rsv); if (rsv->state == UWB_RSV_STATE_T_ACCEPTED) break; } diff --git a/drivers/uwb/uwb-debug.c b/drivers/uwb/uwb-debug.c index 88e6ac71381..217ebaac128 100644 --- a/drivers/uwb/uwb-debug.c +++ b/drivers/uwb/uwb-debug.c @@ -306,13 +306,13 @@ static struct file_operations drp_avail_fops = { .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) { - list_add_tail(&rsv->pal_node, &rc->dbg->rsvs); - uwb_rsv_accept(rsv, uwb_dbg_rsv_cb, NULL); + if (dbg->accept) { + list_add_tail(&rsv->pal_node, &dbg->rsvs); + uwb_rsv_accept(rsv, uwb_dbg_rsv_cb, dbg); } } diff --git a/include/linux/uwb.h b/include/linux/uwb.h index c4854848999..effd97998fd 100644 --- a/include/linux/uwb.h +++ b/include/linux/uwb.h @@ -405,7 +405,7 @@ struct uwb_pal { struct list_head node; const char *name; 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); |