mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-19 10:53:58 +00:00
After thinking again, implement cam_ccbq_fini().
This is effectively NULL change, but makes this API a bit more consistent.
This commit is contained in:
parent
0c35eaad3f
commit
20a7933f53
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=198377
@ -289,7 +289,7 @@ void
|
||||
cam_ccbq_free(struct cam_ccbq *ccbq)
|
||||
{
|
||||
if (ccbq) {
|
||||
camq_fini(&ccbq->queue);
|
||||
cam_ccbq_fini(ccbq);
|
||||
free(ccbq, M_CAMCCBQ);
|
||||
}
|
||||
}
|
||||
@ -338,6 +338,13 @@ cam_ccbq_init(struct cam_ccbq *ccbq, int openings)
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
cam_ccbq_fini(struct cam_ccbq *ccbq)
|
||||
{
|
||||
|
||||
camq_fini(&ccbq->queue);
|
||||
}
|
||||
|
||||
/*
|
||||
* Heap routines for manipulating CAM queues.
|
||||
*/
|
||||
|
@ -96,6 +96,8 @@ int cam_ccbq_init(struct cam_ccbq *ccbq, int openings);
|
||||
|
||||
void cam_ccbq_free(struct cam_ccbq *ccbq);
|
||||
|
||||
void cam_ccbq_fini(struct cam_ccbq *ccbq);
|
||||
|
||||
/*
|
||||
* Allocate and initialize a cam_queue structure.
|
||||
*/
|
||||
|
@ -4447,7 +4447,7 @@ xpt_release_device(struct cam_eb *bus, struct cam_et *target,
|
||||
devq = bus->sim->devq;
|
||||
cam_devq_resize(devq, devq->alloc_queue.array_size - 1);
|
||||
camq_fini(&device->drvq);
|
||||
camq_fini(&device->ccbq.queue);
|
||||
cam_ccbq_fini(&device->ccbq);
|
||||
free(device, M_CAMXPT);
|
||||
xpt_release_target(bus, target);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user