summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorDominic Braun <inf.braun@fau.de>2018-12-14 13:04:43 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-17 14:31:47 +0100
commit9d4d3ac473912a246b4cee119a44647f20ff4e57 (patch)
tree9e11c3231003b81c1c8d0eb9d46818c27858936f /drivers/staging
parent4dfc415fc20e1897c5d83ee859b44fe312479413 (diff)
staging: vc04_services: Remove VCHI_HELD_MSG_T typedef
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c28
-rw-r--r--drivers/staging/vc04_services/interface/vchi/vchi.h20
-rw-r--r--drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c8
3 files changed, 28 insertions, 28 deletions
diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
index c6d06f19fc6e..16af735af5c3 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c
@@ -139,7 +139,7 @@ struct mmal_msg_context {
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 */
@@ -527,7 +527,7 @@ static void service_callback(void *param,
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) {
@@ -625,7 +625,7 @@ static int send_synchronous_mmal_msg(struct vchiq_mmal_instance *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;
@@ -751,7 +751,7 @@ static int port_info_set(struct vchiq_mmal_instance *instance,
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)
@@ -812,7 +812,7 @@ static int port_info_get(struct vchiq_mmal_instance *instance,
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;
@@ -908,7 +908,7 @@ static int create_component(struct vchiq_mmal_instance *instance,
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;
@@ -955,7 +955,7 @@ static int destroy_component(struct vchiq_mmal_instance *instance,
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;
@@ -988,7 +988,7 @@ static int enable_component(struct vchiq_mmal_instance *instance,
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;
@@ -1020,7 +1020,7 @@ static int disable_component(struct vchiq_mmal_instance *instance,
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;
@@ -1053,7 +1053,7 @@ static int get_version(struct vchiq_mmal_instance *instance,
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;
@@ -1086,7 +1086,7 @@ static int port_action_port(struct vchiq_mmal_instance *instance,
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;
@@ -1130,7 +1130,7 @@ static int port_action_handle(struct vchiq_mmal_instance *instance,
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;
@@ -1175,7 +1175,7 @@ static int port_parameter_set(struct vchiq_mmal_instance *instance,
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;
@@ -1216,7 +1216,7 @@ static int port_parameter_get(struct vchiq_mmal_instance *instance,
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;
diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h
index ee63d2817e58..71f61f242124 100644
--- a/drivers/staging/vc04_services/interface/vchi/vchi.h
+++ b/drivers/staging/vc04_services/interface/vchi/vchi.h
@@ -66,10 +66,10 @@ struct opaque_vchi_service_t;
// 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 {
@@ -176,7 +176,7 @@ extern int32_t vchi_msg_hold(VCHI_SERVICE_HANDLE_T handle,
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,
@@ -188,19 +188,19 @@ 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);
@@ -217,13 +217,13 @@ extern int32_t vchi_msg_iter_remove(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
diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
index 0971f19ec1f6..6e66a2a43782 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c
@@ -382,7 +382,7 @@ EXPORT_SYMBOL(vchi_msg_dequeue);
/***********************************************************
* 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)
@@ -390,7 +390,7 @@ EXPORT_SYMBOL(vchi_msg_dequeue);
* 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
@@ -414,7 +414,7 @@ EXPORT_SYMBOL(vchi_held_msg_release);
* 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
@@ -428,7 +428,7 @@ int32_t vchi_msg_hold(VCHI_SERVICE_HANDLE_T handle,
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;