aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/staging/vc04_services/interface/vchi/vchi.h
diff options
context:
space:
mode:
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>2020-06-29 17:09:26 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-07-01 15:47:06 +0200
commit3c5da06f9969959f5cd85e8baaef9d96059b3924 (patch)
tree2ceeb778b5ced64cab7d5d07e1c57d7316d4dc57 /drivers/staging/vc04_services/interface/vchi/vchi.h
parentstaging: vchiq: Export vchiq_msg_queue_push (diff)
downloadwireguard-linux-3c5da06f9969959f5cd85e8baaef9d96059b3924.tar.xz
wireguard-linux-3c5da06f9969959f5cd85e8baaef9d96059b3924.zip
staging: vchi: Get rid of vchiq_shim's message callback
As vchiq_shim's callback does nothing aside from pushing messages into the service's queue, let's bypass it and jump directly to the service's callbacks, letting them choose whether to use the message queue. It turns out most services don't need to use the message queue, which makes for simpler code in the end. Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de> Link: https://lore.kernel.org/r/20200629150945.10720-29-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vc04_services/interface/vchi/vchi.h')
-rw-r--r--drivers/staging/vc04_services/interface/vchi/vchi.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h
index 789acb7999d1..fdc243f3f60a 100644
--- a/drivers/staging/vc04_services/interface/vchi/vchi.h
+++ b/drivers/staging/vc04_services/interface/vchi/vchi.h
@@ -4,8 +4,6 @@
#ifndef VCHI_H_
#define VCHI_H_
-#include "vchi_common.h"
-
/******************************************************************************
* Global defs
*****************************************************************************/
@@ -31,16 +29,13 @@ struct vchi_held_msg {
struct vchi_service {
unsigned int handle;
-
- vchi_callback callback;
- void *callback_param;
};
// structure used to provide the information needed to open a server or a client
struct service_creation {
struct vchi_version version;
int32_t service_id;
- vchi_callback callback;
+ vchiq_callback callback;
void *callback_param;
};
@@ -88,7 +83,7 @@ extern int vchi_queue_kernel_message(struct vchi_service *service, void *data,
// Routine to look at a message in place.
// The message is dequeued, so the caller is left holding it; the descriptor is
// filled in and must be released when the user has finished with the message.
-extern int32_t vchi_msg_hold(struct vchi_service *service,
+extern int32_t vchi_msg_hold(unsigned handle,
void **data, // } may be NULL, as info can be
uint32_t *msg_size, // } obtained from HELD_MSG_T
struct vchi_held_msg *message_descriptor);