mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 00:43:08 -04:00
staging: vchiq_core: Pass vchiq_bulk pointer to make_service_callback()
Pass struct vchiq_bulk pointer to make_service_callback() instead of just passing the bulk->cb_data. This is a preparatory change when we need to pass the callback data user pointer (__user) in a subsequent commit. Signed-off-by: Umang Jain <umang.jain@ideasonboard.com> Link: https://lore.kernel.org/r/20241023110406.885199-6-umang.jain@ideasonboard.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ccb0b5e4f5
commit
951b3c1435
@@ -455,10 +455,18 @@ mark_service_closing(struct vchiq_service *service)
|
||||
|
||||
static inline int
|
||||
make_service_callback(struct vchiq_service *service, enum vchiq_reason reason,
|
||||
struct vchiq_header *header, void *cb_data)
|
||||
struct vchiq_header *header, struct vchiq_bulk *bulk)
|
||||
{
|
||||
void *cb_data = NULL;
|
||||
int status;
|
||||
|
||||
/*
|
||||
* If a bulk transfer is in progress, pass bulk->cb_data to the
|
||||
* callback function.
|
||||
*/
|
||||
if (bulk)
|
||||
cb_data = bulk->cb_data;
|
||||
|
||||
dev_dbg(service->state->dev, "core: %d: callback:%d (%s, %pK, %pK)\n",
|
||||
service->state->id, service->localport, reason_names[reason],
|
||||
header, cb_data);
|
||||
@@ -1339,8 +1347,7 @@ static int service_notify_bulk(struct vchiq_service *service,
|
||||
} else if (bulk->mode == VCHIQ_BULK_MODE_CALLBACK) {
|
||||
enum vchiq_reason reason = get_bulk_reason(bulk);
|
||||
|
||||
return make_service_callback(service, reason, NULL,
|
||||
bulk->cb_data);
|
||||
return make_service_callback(service, reason, NULL, bulk);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user