Typedefing structs is not encouraged in the kernel.
Signed-off-by: Dominic Braun <inf.braun@fau.de>
Signed-off-by: Tobias Büttner <tobias.buettner@fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
struct {
/* message handle to release */
- VCHI_HELD_MSG_T msg_handle;
+ struct vchi_held_msg msg_handle;
/* pointer to received message */
struct mmal_msg *msg;
/* received message length */
int status;
u32 msg_len;
struct mmal_msg *msg;
- VCHI_HELD_MSG_T msg_handle;
+ struct vchi_held_msg msg_handle;
struct mmal_msg_context *msg_context;
if (!instance) {
struct mmal_msg *msg,
unsigned int payload_len,
struct mmal_msg **msg_out,
- VCHI_HELD_MSG_T *msg_handle_out)
+ struct vchi_held_msg *msg_handle_out)
{
struct mmal_msg_context *msg_context;
int ret;
int ret;
struct mmal_msg m;
struct mmal_msg *rmsg;
- VCHI_HELD_MSG_T rmsg_handle;
+ struct vchi_held_msg rmsg_handle;
pr_debug("setting port info port %p\n", port);
if (!port)
int ret;
struct mmal_msg m;
struct mmal_msg *rmsg;
- VCHI_HELD_MSG_T rmsg_handle;
+ struct vchi_held_msg rmsg_handle;
/* port info time */
m.h.type = MMAL_MSG_TYPE_PORT_INFO_GET;
int ret;
struct mmal_msg m;
struct mmal_msg *rmsg;
- VCHI_HELD_MSG_T rmsg_handle;
+ struct vchi_held_msg rmsg_handle;
/* build component create message */
m.h.type = MMAL_MSG_TYPE_COMPONENT_CREATE;
int ret;
struct mmal_msg m;
struct mmal_msg *rmsg;
- VCHI_HELD_MSG_T rmsg_handle;
+ struct vchi_held_msg rmsg_handle;
m.h.type = MMAL_MSG_TYPE_COMPONENT_DESTROY;
m.u.component_destroy.component_handle = component->handle;
int ret;
struct mmal_msg m;
struct mmal_msg *rmsg;
- VCHI_HELD_MSG_T rmsg_handle;
+ struct vchi_held_msg rmsg_handle;
m.h.type = MMAL_MSG_TYPE_COMPONENT_ENABLE;
m.u.component_enable.component_handle = component->handle;
int ret;
struct mmal_msg m;
struct mmal_msg *rmsg;
- VCHI_HELD_MSG_T rmsg_handle;
+ struct vchi_held_msg rmsg_handle;
m.h.type = MMAL_MSG_TYPE_COMPONENT_DISABLE;
m.u.component_disable.component_handle = component->handle;
int ret;
struct mmal_msg m;
struct mmal_msg *rmsg;
- VCHI_HELD_MSG_T rmsg_handle;
+ struct vchi_held_msg rmsg_handle;
m.h.type = MMAL_MSG_TYPE_GET_VERSION;
int ret;
struct mmal_msg m;
struct mmal_msg *rmsg;
- VCHI_HELD_MSG_T rmsg_handle;
+ struct vchi_held_msg rmsg_handle;
m.h.type = MMAL_MSG_TYPE_PORT_ACTION;
m.u.port_action_port.component_handle = port->component->handle;
int ret;
struct mmal_msg m;
struct mmal_msg *rmsg;
- VCHI_HELD_MSG_T rmsg_handle;
+ struct vchi_held_msg rmsg_handle;
m.h.type = MMAL_MSG_TYPE_PORT_ACTION;
int ret;
struct mmal_msg m;
struct mmal_msg *rmsg;
- VCHI_HELD_MSG_T rmsg_handle;
+ struct vchi_held_msg rmsg_handle;
m.h.type = MMAL_MSG_TYPE_PORT_PARAMETER_SET;
int ret;
struct mmal_msg m;
struct mmal_msg *rmsg;
- VCHI_HELD_MSG_T rmsg_handle;
+ struct vchi_held_msg rmsg_handle;
m.h.type = MMAL_MSG_TYPE_PORT_PARAMETER_GET;
// Descriptor for a held message. Allocated by client, initialised by vchi_msg_hold,
// vchi_msg_iter_hold or vchi_msg_iter_hold_next. Fields are for internal VCHI use only.
-typedef struct {
+struct vchi_held_msg {
struct opaque_vchi_service_t *service;
void *message;
-} VCHI_HELD_MSG_T;
+};
// structure used to provide the information needed to open a server or a client
struct service_creation {
void **data, // } may be NULL, as info can be
uint32_t *msg_size, // } obtained from HELD_MSG_T
VCHI_FLAGS_T flags,
- VCHI_HELD_MSG_T *message_descriptor);
+ struct vchi_held_msg *message_descriptor);
// Initialise an iterator to look through messages in place
extern int32_t vchi_msg_look_ahead(VCHI_SERVICE_HANDLE_T handle,
*****************************************************************************/
// Routine to get the address of a held message
-extern void *vchi_held_msg_ptr(const VCHI_HELD_MSG_T *message);
+extern void *vchi_held_msg_ptr(const struct vchi_held_msg *message);
// Routine to get the size of a held message
-extern int32_t vchi_held_msg_size(const VCHI_HELD_MSG_T *message);
+extern int32_t vchi_held_msg_size(const struct vchi_held_msg *message);
// Routine to get the transmit timestamp as written into the header by the peer
-extern uint32_t vchi_held_msg_tx_timestamp(const VCHI_HELD_MSG_T *message);
+extern uint32_t vchi_held_msg_tx_timestamp(const struct vchi_held_msg *message);
// Routine to get the reception timestamp, written as we parsed the header
-extern uint32_t vchi_held_msg_rx_timestamp(const VCHI_HELD_MSG_T *message);
+extern uint32_t vchi_held_msg_rx_timestamp(const struct vchi_held_msg *message);
// Routine to release a held message after it has been processed
-extern int32_t vchi_held_msg_release(VCHI_HELD_MSG_T *message);
+extern int32_t vchi_held_msg_release(struct vchi_held_msg *message);
// Indicates whether the iterator has a next message.
extern int32_t vchi_msg_iter_has_next(const VCHI_MSG_ITER_T *iter);
// Hold the last message returned by vchi_msg_iter_next.
// Can only be called once after each call to vchi_msg_iter_next.
extern int32_t vchi_msg_iter_hold(VCHI_MSG_ITER_T *iter,
- VCHI_HELD_MSG_T *message);
+ struct vchi_held_msg *message);
// Return information for the next message, and hold it, advancing the iterator.
extern int32_t vchi_msg_iter_hold_next(VCHI_MSG_ITER_T *iter,
void **data, // } may be NULL
uint32_t *msg_size, // }
- VCHI_HELD_MSG_T *message);
+ struct vchi_held_msg *message);
/******************************************************************************
Global bulk API
/***********************************************************
* Name: vchi_held_msg_release
*
- * Arguments: VCHI_HELD_MSG_T *message
+ * Arguments: struct vchi_held_msg *message
*
* Description: Routine to release a held message (after it has been read with
* vchi_msg_hold)
* Returns: int32_t - success == 0
*
***********************************************************/
-int32_t vchi_held_msg_release(VCHI_HELD_MSG_T *message)
+int32_t vchi_held_msg_release(struct vchi_held_msg *message)
{
/*
* Convert the service field pointer back to an
* void **data,
* uint32_t *msg_size,
* VCHI_FLAGS_T flags,
- * VCHI_HELD_MSG_T *message_handle
+ * struct vchi_held_msg *message_handle
*
* Description: Routine to return a pointer to the current message (to allow
* in place processing). The message is dequeued - don't forget
void **data,
uint32_t *msg_size,
VCHI_FLAGS_T flags,
- VCHI_HELD_MSG_T *message_handle)
+ struct vchi_held_msg *message_handle)
{
struct shim_service *service = (struct shim_service *)handle;
VCHIQ_HEADER_T *header;