From 3e722c805cdf9cb6b43ca3646cc72013cb186af2 Mon Sep 17 00:00:00 2001 From: Jules Irenge Date: Thu, 17 Oct 2019 17:31:26 +0100 Subject: staging: vc04_services: fix warnings of scpace required between operator Fix warnings of space required between operator and variables. Issue detected by checkpatch tool Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191017163126.23992-1-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vc04_services/interface/vchi/vchi.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/staging/vc04_services/interface/vchi/vchi.h') diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index f85562b9ba9e..bdc393d36769 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -11,14 +11,14 @@ Global defs *****************************************************************************/ -#define VCHI_BULK_ROUND_UP(x) ((((unsigned long)(x))+VCHI_BULK_ALIGN-1) & ~(VCHI_BULK_ALIGN-1)) -#define VCHI_BULK_ROUND_DOWN(x) (((unsigned long)(x)) & ~(VCHI_BULK_ALIGN-1)) -#define VCHI_BULK_ALIGN_NBYTES(x) (VCHI_BULK_ALIGNED(x) ? 0 : (VCHI_BULK_ALIGN - ((unsigned long)(x) & (VCHI_BULK_ALIGN-1)))) +#define VCHI_BULK_ROUND_UP(x) ((((unsigned long)(x)) + VCHI_BULK_ALIGN - 1) & ~(VCHI_BULK_ALIGN - 1)) +#define VCHI_BULK_ROUND_DOWN(x) (((unsigned long)(x)) & ~(VCHI_BULK_ALIGN - 1)) +#define VCHI_BULK_ALIGN_NBYTES(x) (VCHI_BULK_ALIGNED(x) ? 0 : (VCHI_BULK_ALIGN - ((unsigned long)(x) & (VCHI_BULK_ALIGN - 1)))) #ifdef USE_VCHIQ_ARM #define VCHI_BULK_ALIGNED(x) 1 #else -#define VCHI_BULK_ALIGNED(x) (((unsigned long)(x) & (VCHI_BULK_ALIGN-1)) == 0) +#define VCHI_BULK_ALIGNED(x) (((unsigned long)(x) & (VCHI_BULK_ALIGN - 1)) == 0) #endif struct vchi_version { -- cgit v1.2.3-59-g8ed1b From 25c42086c711719f3d3b520fc837ac422f73aa85 Mon Sep 17 00:00:00 2001 From: Jules Irenge Date: Thu, 17 Oct 2019 18:38:37 +0100 Subject: staging: vc04_services: fix warnings of Block comments use of * Fix warnings of Block comments use * on subsequent lines. Issue detected by checkpatch tool. Signed-off-by: Jules Irenge Link: https://lore.kernel.org/r/20191017173837.27336-1-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vc04_services/interface/vchi/vchi.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'drivers/staging/vc04_services/interface/vchi/vchi.h') diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index bdc393d36769..0a353a468f34 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -8,7 +8,7 @@ #include "interface/vchi/vchi_common.h" /****************************************************************************** - Global defs + * Global defs *****************************************************************************/ #define VCHI_BULK_ROUND_UP(x) ((((unsigned long)(x)) + VCHI_BULK_ALIGN - 1) & ~(VCHI_BULK_ALIGN - 1)) @@ -56,7 +56,8 @@ typedef struct opaque_vchi_instance_handle_t *VCHI_INSTANCE_T; typedef struct opaque_vchi_service_handle_t *VCHI_SERVICE_HANDLE_T; /****************************************************************************** - Global funcs - implementation is specific to which side you are on (local / remote) + * Global funcs - implementation is specific to which side you are on + * (local / remote) *****************************************************************************/ #ifdef __cplusplus @@ -80,7 +81,7 @@ extern void vchi_free_buffer(VCHI_SERVICE_HANDLE_T handle, void *address); extern uint32_t vchi_current_time(VCHI_INSTANCE_T instance_handle); /****************************************************************************** - Global service API + * Global service API *****************************************************************************/ // Routine to destroy a service extern int32_t vchi_service_destroy(const VCHI_SERVICE_HANDLE_T handle); @@ -153,9 +154,10 @@ extern int32_t vchi_msg_look_ahead(VCHI_SERVICE_HANDLE_T handle, struct vchi_msg_iter *iter, VCHI_FLAGS_T flags); -/****************************************************************************** - Global service support API - operations on held messages and message iterators - *****************************************************************************/ +/******************************************************************************* + * Global service support API - operations on held messages + * and message iterators + ******************************************************************************/ // Routine to get the address of a held message extern void *vchi_held_msg_ptr(const struct vchi_held_msg *message); @@ -196,7 +198,7 @@ extern int32_t vchi_msg_iter_hold_next(struct vchi_msg_iter *iter, struct vchi_held_msg *message); /****************************************************************************** - Global bulk API + * Global bulk API *****************************************************************************/ // Routine to prepare interface for a transfer from the other side @@ -221,7 +223,7 @@ extern int32_t vchi_bulk_queue_transmit(VCHI_SERVICE_HANDLE_T handle, void *transfer_handle); /****************************************************************************** - Configuration plumbing + * Configuration plumbing *****************************************************************************/ #ifdef __cplusplus -- cgit v1.2.3-59-g8ed1b From 8823d99080ba59598f00b7e50b281c46ddd39d56 Mon Sep 17 00:00:00 2001 From: Jamal Shareef Date: Fri, 1 Nov 2019 17:04:14 -0700 Subject: staging: vc04_services: Remove enum typedefs in vchi Remove enum typedefs from header files and files which include them in vchi. Issue found by checkpatch. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/4afc7d28ef9ad249cac3bf7c3dd453bb64b13657.1572652827.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman --- .../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +- .../vc04_services/bcm2835-camera/mmal-vchiq.c | 2 +- .../staging/vc04_services/interface/vchi/vchi.h | 20 ++++----- .../vc04_services/interface/vchi/vchi_common.h | 18 ++++---- .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 50 ++++++++++------------ 5 files changed, 43 insertions(+), 49 deletions(-) (limited to 'drivers/staging/vc04_services/interface/vchi/vchi.h') diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c index 5f6a73af57f9..84ece768854f 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c @@ -90,7 +90,7 @@ static int bcm2835_audio_send_simple(struct bcm2835_audio_instance *instance, } static void audio_vchi_callback(void *param, - const VCHI_CALLBACK_REASON_T reason, + const enum vchi_callback_reason reason, void *msg_handle) { struct bcm2835_audio_instance *instance = param; diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c index 1c180ead4a20..06b7be7d8872 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c @@ -535,7 +535,7 @@ static void bulk_abort_cb(struct vchiq_mmal_instance *instance, /* incoming event service callback */ static void service_callback(void *param, - const VCHI_CALLBACK_REASON_T reason, + const enum vchi_callback_reason reason, void *bulk_ctx) { struct vchiq_mmal_instance *instance = param; diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index 0a353a468f34..75b1ab4919e3 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -105,8 +105,8 @@ extern int32_t vchi_service_release(const VCHI_SERVICE_HANDLE_T handle); // Routine to set a control option for a named service extern int32_t vchi_service_set_option(const VCHI_SERVICE_HANDLE_T handle, - VCHI_SERVICE_OPTION_T option, - int value); + enum vchi_service_option option, + int value); /* Routine to send a message from kernel memory across a service */ extern int @@ -126,7 +126,7 @@ extern int32_t vchi_msg_dequeue(VCHI_SERVICE_HANDLE_T handle, void *data, uint32_t max_data_size_to_read, uint32_t *actual_msg_size, - VCHI_FLAGS_T flags); + enum vchi_flags flags); // Routine to look at a message in place. // The message is not dequeued, so a subsequent call to peek or dequeue @@ -134,7 +134,7 @@ extern int32_t vchi_msg_dequeue(VCHI_SERVICE_HANDLE_T handle, extern int32_t vchi_msg_peek(VCHI_SERVICE_HANDLE_T handle, void **data, uint32_t *msg_size, - VCHI_FLAGS_T flags); + enum vchi_flags flags); // Routine to remove a message after it has been read in place with peek // The first message on the queue is dequeued. @@ -146,13 +146,13 @@ extern int32_t vchi_msg_remove(VCHI_SERVICE_HANDLE_T handle); 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, + enum vchi_flags flags, 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, struct vchi_msg_iter *iter, - VCHI_FLAGS_T flags); + enum vchi_flags flags); /******************************************************************************* * Global service support API - operations on held messages @@ -205,21 +205,21 @@ extern int32_t vchi_msg_iter_hold_next(struct vchi_msg_iter *iter, extern int32_t vchi_bulk_queue_receive(VCHI_SERVICE_HANDLE_T handle, void *data_dst, uint32_t data_size, - VCHI_FLAGS_T flags, + enum vchi_flags flags, void *transfer_handle); // Prepare interface for a transfer from the other side into relocatable memory. int32_t vchi_bulk_queue_receive_reloc(const VCHI_SERVICE_HANDLE_T handle, uint32_t offset, uint32_t data_size, - const VCHI_FLAGS_T flags, + const enum vchi_flags flags, void * const bulk_handle); // Routine to queue up data ready for transfer to the other (once they have signalled they are ready) extern int32_t vchi_bulk_queue_transmit(VCHI_SERVICE_HANDLE_T handle, const void *data_src, uint32_t data_size, - VCHI_FLAGS_T flags, + enum vchi_flags flags, void *transfer_handle); /****************************************************************************** @@ -233,7 +233,7 @@ extern int32_t vchi_bulk_queue_transmit(VCHI_SERVICE_HANDLE_T handle, extern int32_t vchi_bulk_queue_transmit_reloc(VCHI_SERVICE_HANDLE_T handle, uint32_t offset, uint32_t data_size, - VCHI_FLAGS_T flags, + enum vchi_flags flags, void *transfer_handle); #endif /* VCHI_H_ */ diff --git a/drivers/staging/vc04_services/interface/vchi/vchi_common.h b/drivers/staging/vc04_services/interface/vchi/vchi_common.h index 1fdbe038500a..c99735fc0308 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi_common.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi_common.h @@ -5,7 +5,7 @@ #define VCHI_COMMON_H_ //flags used when sending messages (must be bitmapped) -typedef enum { +enum vchi_flags { VCHI_FLAGS_NONE = 0x0, VCHI_FLAGS_BLOCK_UNTIL_OP_COMPLETE = 0x1, // waits for message to be received, or sent (NB. not the same as being seen on other side) VCHI_FLAGS_CALLBACK_WHEN_OP_COMPLETE = 0x2, // run a callback when message sent @@ -20,17 +20,17 @@ typedef enum { VCHI_FLAGS_BULK_DATA_QUEUED = 0x040000, // internal use only VCHI_FLAGS_BULK_DATA_COMPLETE = 0x080000, // internal use only VCHI_FLAGS_INTERNAL = 0xFF0000 -} VCHI_FLAGS_T; +}; // constants for vchi_crc_control() -typedef enum { +enum vchi_crc_control { VCHI_CRC_NOTHING = -1, VCHI_CRC_PER_SERVICE = 0, VCHI_CRC_EVERYTHING = 1, -} VCHI_CRC_CONTROL_T; +}; //callback reasons when an event occurs on a service -typedef enum { +enum vchi_callback_reason { VCHI_CALLBACK_REASON_MIN, //This indicates that there is data available @@ -73,21 +73,21 @@ typedef enum { VCHI_CALLBACK_BULK_TRANSMIT_ABORTED, VCHI_CALLBACK_REASON_MAX -} VCHI_CALLBACK_REASON_T; +}; // service control options -typedef enum { +enum vchi_service_option { VCHI_SERVICE_OPTION_MIN, VCHI_SERVICE_OPTION_TRACE, VCHI_SERVICE_OPTION_SYNCHRONOUS, VCHI_SERVICE_OPTION_MAX -} VCHI_SERVICE_OPTION_T; +}; //Callback used by all services / bulk transfers typedef void (*VCHI_CALLBACK_T)(void *callback_param, //my service local param - VCHI_CALLBACK_REASON_T reason, + enum vchi_callback_reason reason, void *handle); //for transmitting msg's only /* 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 5e26f0abd5ee..704afd470c88 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c @@ -27,7 +27,7 @@ struct shim_service { * void **data, * uint32_t *msg_size, - * VCHI_FLAGS_T flags + * enum vchi_flags flags * * Description: Routine to return a pointer to the current message (to allow in * place processing). The message can be removed using @@ -37,9 +37,9 @@ struct shim_service { * ***********************************************************/ int32_t vchi_msg_peek(VCHI_SERVICE_HANDLE_T handle, - void **data, - uint32_t *msg_size, - VCHI_FLAGS_T flags) + void **data, + uint32_t *msg_size, + enum vchi_flags flags) { struct shim_service *service = (struct shim_service *)handle; struct vchiq_header *header; @@ -190,7 +190,7 @@ EXPORT_SYMBOL(vchi_queue_user_message); * Arguments: VCHI_BULK_HANDLE_T handle, * void *data_dst, * const uint32_t data_size, - * VCHI_FLAGS_T flags + * enum vchi_flags flags * void *bulk_handle * * Description: Routine to setup a rcv buffer @@ -198,11 +198,9 @@ EXPORT_SYMBOL(vchi_queue_user_message); * Returns: int32_t - success == 0 * ***********************************************************/ -int32_t vchi_bulk_queue_receive(VCHI_SERVICE_HANDLE_T handle, - void *data_dst, - uint32_t data_size, - VCHI_FLAGS_T flags, - void *bulk_handle) +int32_t vchi_bulk_queue_receive(VCHI_SERVICE_HANDLE_T handle, void *data_dst, + uint32_t data_size, enum vchi_flags flags, + void *bulk_handle) { struct shim_service *service = (struct shim_service *)handle; VCHIQ_BULK_MODE_T mode; @@ -250,7 +248,7 @@ EXPORT_SYMBOL(vchi_bulk_queue_receive); * Arguments: VCHI_BULK_HANDLE_T handle, * const void *data_src, * uint32_t data_size, - * VCHI_FLAGS_T flags, + * enum vchi_flags flags, * void *bulk_handle * * Description: Routine to transmit some data @@ -259,10 +257,10 @@ EXPORT_SYMBOL(vchi_bulk_queue_receive); * ***********************************************************/ int32_t vchi_bulk_queue_transmit(VCHI_SERVICE_HANDLE_T handle, - const void *data_src, - uint32_t data_size, - VCHI_FLAGS_T flags, - void *bulk_handle) + const void *data_src, + uint32_t data_size, + enum vchi_flags flags, + void *bulk_handle) { struct shim_service *service = (struct shim_service *)handle; VCHIQ_BULK_MODE_T mode; @@ -313,18 +311,16 @@ EXPORT_SYMBOL(vchi_bulk_queue_transmit); * void *data, * uint32_t max_data_size_to_read, * uint32_t *actual_msg_size - * VCHI_FLAGS_T flags + * enum vchi_flags flags * * Description: Routine to dequeue a message into the supplied buffer * * Returns: int32_t - success == 0 * ***********************************************************/ -int32_t vchi_msg_dequeue(VCHI_SERVICE_HANDLE_T handle, - void *data, - uint32_t max_data_size_to_read, - uint32_t *actual_msg_size, - VCHI_FLAGS_T flags) +int32_t vchi_msg_dequeue(VCHI_SERVICE_HANDLE_T handle, void *data, + uint32_t max_data_size_to_read, + uint32_t *actual_msg_size, enum vchi_flags flags) { struct shim_service *service = (struct shim_service *)handle; struct vchiq_header *header; @@ -383,7 +379,7 @@ EXPORT_SYMBOL(vchi_held_msg_release); * Arguments: VCHI_SERVICE_HANDLE_T handle, * void **data, * uint32_t *msg_size, - * VCHI_FLAGS_T flags, + * enum vchi_flags flags, * struct vchi_held_msg *message_handle * * Description: Routine to return a pointer to the current message (to allow @@ -394,11 +390,9 @@ EXPORT_SYMBOL(vchi_held_msg_release); * Returns: int32_t - success == 0 * ***********************************************************/ -int32_t vchi_msg_hold(VCHI_SERVICE_HANDLE_T handle, - void **data, - uint32_t *msg_size, - VCHI_FLAGS_T flags, - struct vchi_held_msg *message_handle) +int32_t vchi_msg_hold(VCHI_SERVICE_HANDLE_T handle, void **data, + uint32_t *msg_size, enum vchi_flags flags, + struct vchi_held_msg *message_handle) { struct shim_service *service = (struct shim_service *)handle; struct vchiq_header *header; @@ -668,7 +662,7 @@ int32_t vchi_service_destroy(const VCHI_SERVICE_HANDLE_T handle) EXPORT_SYMBOL(vchi_service_destroy); int32_t vchi_service_set_option(const VCHI_SERVICE_HANDLE_T handle, - VCHI_SERVICE_OPTION_T option, + enum vchi_service_option option, int value) { int32_t ret = -1; -- cgit v1.2.3-59-g8ed1b From fb22360db6517e2392d432737e4859ee07c43533 Mon Sep 17 00:00:00 2001 From: Jamal Shareef Date: Tue, 5 Nov 2019 14:55:18 -0800 Subject: staging: vc04_services: Replace VCHI_INSTANCE_T with struct vhci_instance_handle Replaces VCHI_INSTANCE_T typedef with struct vchi_instance_handle to match kernel code style. Issue found by checkpatch. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/0b481a90b8a2b9cd6718e972dab681854ff312d7.1572994235.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman --- .../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +- drivers/staging/vc04_services/bcm2835-audio/bcm2835.h | 2 +- .../staging/vc04_services/bcm2835-camera/mmal-vchiq.c | 2 +- drivers/staging/vc04_services/interface/vchi/vchi.h | 12 ++++++------ .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 18 +++++++++--------- 5 files changed, 18 insertions(+), 18 deletions(-) (limited to 'drivers/staging/vc04_services/interface/vchi/vchi.h') diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c index 84ece768854f..2022ff2388dc 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c @@ -122,7 +122,7 @@ static void audio_vchi_callback(void *param, } static int -vc_vchi_audio_init(VCHI_INSTANCE_T vchi_instance, +vc_vchi_audio_init(struct vchi_instance_handle *vchi_instance, struct bcm2835_audio_instance *instance) { struct service_creation params = { diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h index ed0feb34b6c8..d2fe8d36ab7d 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h @@ -44,7 +44,7 @@ enum snd_bcm2835_ctrl { }; struct bcm2835_vchi_ctx { - VCHI_INSTANCE_T vchi_instance; + struct vchi_instance_handle *vchi_instance; }; /* definition of the chip-specific record */ diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c index 06b7be7d8872..0f4db2f24944 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c @@ -1814,7 +1814,7 @@ int vchiq_mmal_init(struct vchiq_mmal_instance **out_instance) { int status; struct vchiq_mmal_instance *instance; - static VCHI_INSTANCE_T vchi_instance; + static struct vchi_instance_handle *vchi_instance; struct service_creation params = { .version = VCHI_VERSION_EX(VC_MMAL_VER, VC_MMAL_MIN_VER), .service_id = VC_MMAL_SERVER_NAME, diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index 75b1ab4919e3..5c8842114607 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -50,7 +50,7 @@ struct service_creation { }; // Opaque handle for a VCHI instance -typedef struct opaque_vchi_instance_handle_t *VCHI_INSTANCE_T; +struct vchi_instance_handle; // Opaque handle for a server or client typedef struct opaque_vchi_service_handle_t *VCHI_SERVICE_HANDLE_T; @@ -65,20 +65,20 @@ extern "C" { #endif // Routine used to initialise the vchi on both local + remote connections -extern int32_t vchi_initialise(VCHI_INSTANCE_T *instance_handle); +extern int32_t vchi_initialise(struct vchi_instance_handle **instance_handle); extern int32_t vchi_exit(void); -extern int32_t vchi_connect(VCHI_INSTANCE_T instance_handle); +extern int32_t vchi_connect(struct vchi_instance_handle *instance_handle); //When this is called, ensure that all services have no data pending. //Bulk transfers can remain 'queued' -extern int32_t vchi_disconnect(VCHI_INSTANCE_T instance_handle); +extern int32_t vchi_disconnect(struct vchi_instance_handle *instance_handle); // helper functions extern void *vchi_allocate_buffer(VCHI_SERVICE_HANDLE_T handle, uint32_t *length); extern void vchi_free_buffer(VCHI_SERVICE_HANDLE_T handle, void *address); -extern uint32_t vchi_current_time(VCHI_INSTANCE_T instance_handle); +extern uint32_t vchi_current_time(struct vchi_instance_handle *instance_handle); /****************************************************************************** * Global service API @@ -87,7 +87,7 @@ extern uint32_t vchi_current_time(VCHI_INSTANCE_T instance_handle); extern int32_t vchi_service_destroy(const VCHI_SERVICE_HANDLE_T handle); // Routine to open a named service -extern int32_t vchi_service_open(VCHI_INSTANCE_T instance_handle, +extern int32_t vchi_service_open(struct vchi_instance_handle *instance_handle, struct service_creation *setup, VCHI_SERVICE_HANDLE_T *handle); 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 704afd470c88..0227c3f27697 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c @@ -428,7 +428,7 @@ EXPORT_SYMBOL(vchi_msg_hold); /*********************************************************** * Name: vchi_initialise * - * Arguments: VCHI_INSTANCE_T *instance_handle + * Arguments: struct vchi_instance_handle **instance_handle * * Description: Initialises the hardware but does not transmit anything * When run as a Host App this will be called twice hence the need @@ -438,14 +438,14 @@ EXPORT_SYMBOL(vchi_msg_hold); * ***********************************************************/ -int32_t vchi_initialise(VCHI_INSTANCE_T *instance_handle) +int32_t vchi_initialise(struct vchi_instance_handle **instance_handle) { VCHIQ_INSTANCE_T instance; VCHIQ_STATUS_T status; status = vchiq_initialise(&instance); - *instance_handle = (VCHI_INSTANCE_T)instance; + *instance_handle = (struct vchi_instance_handle *)instance; return vchiq_status_to_vchi(status); } @@ -454,7 +454,7 @@ EXPORT_SYMBOL(vchi_initialise); /*********************************************************** * Name: vchi_connect * - * Arguments: VCHI_INSTANCE_T instance_handle + * Arguments: struct vchi_instance_handle *instance_handle * * Description: Starts the command service on each connection, * causing INIT messages to be pinged back and forth @@ -462,7 +462,7 @@ EXPORT_SYMBOL(vchi_initialise); * Returns: 0 if successful, failure otherwise * ***********************************************************/ -int32_t vchi_connect(VCHI_INSTANCE_T instance_handle) +int32_t vchi_connect(struct vchi_instance_handle *instance_handle) { VCHIQ_INSTANCE_T instance = (VCHIQ_INSTANCE_T)instance_handle; @@ -473,7 +473,7 @@ EXPORT_SYMBOL(vchi_connect); /*********************************************************** * Name: vchi_disconnect * - * Arguments: VCHI_INSTANCE_T instance_handle + * Arguments: struct vchi_instance_handle *instance_handle * * Description: Stops the command service on each connection, * causing DE-INIT messages to be pinged back and forth @@ -481,7 +481,7 @@ EXPORT_SYMBOL(vchi_connect); * Returns: 0 if successful, failure otherwise * ***********************************************************/ -int32_t vchi_disconnect(VCHI_INSTANCE_T instance_handle) +int32_t vchi_disconnect(struct vchi_instance_handle *instance_handle) { VCHIQ_INSTANCE_T instance = (VCHIQ_INSTANCE_T)instance_handle; @@ -493,7 +493,7 @@ EXPORT_SYMBOL(vchi_disconnect); * Name: vchi_service_open * Name: vchi_service_create * - * Arguments: VCHI_INSTANCE_T *instance_handle + * Arguments: struct vchi_instance_handle *instance_handle * struct service_creation *setup, * VCHI_SERVICE_HANDLE_T *handle * @@ -593,7 +593,7 @@ static void service_free(struct shim_service *service) } } -int32_t vchi_service_open(VCHI_INSTANCE_T instance_handle, +int32_t vchi_service_open(struct vchi_instance_handle *instance_handle, struct service_creation *setup, VCHI_SERVICE_HANDLE_T *handle) { -- cgit v1.2.3-59-g8ed1b From 29ebf64f741e7f40d6c0e5d187fa0cd0a0ddd4f1 Mon Sep 17 00:00:00 2001 From: Jamal Shareef Date: Tue, 5 Nov 2019 14:55:19 -0800 Subject: staging: vc04_services: Replace VCHI_SERVICE_HANDLE_T typedef with struct vchi_service_handle Replaces VCHI_SERVICE_HANDLE_T typedef with vchi_service_handle struct to match kernel code style. Issue found by checkpatch. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/ec9a1a4bdd87ff008e48835cf7c39847d999b147.1572994235.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman --- .../vc04_services/bcm2835-audio/bcm2835-vchiq.c | 2 +- .../vc04_services/bcm2835-camera/mmal-vchiq.c | 2 +- .../staging/vc04_services/interface/vchi/vchi.h | 42 +++++++++--------- .../vc04_services/interface/vchiq_arm/vchiq_shim.c | 50 +++++++++++----------- 4 files changed, 48 insertions(+), 48 deletions(-) (limited to 'drivers/staging/vc04_services/interface/vchi/vchi.h') diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c index 2022ff2388dc..73144f1ce45e 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835-vchiq.c @@ -9,7 +9,7 @@ struct bcm2835_audio_instance { struct device *dev; - VCHI_SERVICE_HANDLE_T vchi_handle; + struct vchi_service_handle *vchi_handle; struct completion msg_avail_comp; struct mutex vchi_mutex; struct bcm2835_alsa_stream *alsa_stream; diff --git a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c index 0f4db2f24944..de03b90021a8 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c +++ b/drivers/staging/vc04_services/bcm2835-camera/mmal-vchiq.c @@ -155,7 +155,7 @@ struct mmal_msg_context { }; struct vchiq_mmal_instance { - VCHI_SERVICE_HANDLE_T handle; + struct vchi_service_handle *handle; /* ensure serialised access to service */ struct mutex vchiq_mutex; diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index 5c8842114607..05fb5c3e8ba0 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -53,7 +53,7 @@ struct service_creation { struct vchi_instance_handle; // Opaque handle for a server or client -typedef struct opaque_vchi_service_handle_t *VCHI_SERVICE_HANDLE_T; +struct vchi_service_handle; /****************************************************************************** * Global funcs - implementation is specific to which side you are on @@ -76,53 +76,53 @@ extern int32_t vchi_connect(struct vchi_instance_handle *instance_handle); extern int32_t vchi_disconnect(struct vchi_instance_handle *instance_handle); // helper functions -extern void *vchi_allocate_buffer(VCHI_SERVICE_HANDLE_T handle, uint32_t *length); -extern void vchi_free_buffer(VCHI_SERVICE_HANDLE_T handle, void *address); +extern void *vchi_allocate_buffer(struct vchi_service_handle *handle, uint32_t *length); +extern void vchi_free_buffer(struct vchi_service_handle *handle, void *address); extern uint32_t vchi_current_time(struct vchi_instance_handle *instance_handle); /****************************************************************************** * Global service API *****************************************************************************/ // Routine to destroy a service -extern int32_t vchi_service_destroy(const VCHI_SERVICE_HANDLE_T handle); +extern int32_t vchi_service_destroy(const struct vchi_service_handle *handle); // Routine to open a named service extern int32_t vchi_service_open(struct vchi_instance_handle *instance_handle, struct service_creation *setup, - VCHI_SERVICE_HANDLE_T *handle); + struct vchi_service_handle **handle); -extern int32_t vchi_get_peer_version(const VCHI_SERVICE_HANDLE_T handle, +extern int32_t vchi_get_peer_version(const struct vchi_service_handle *handle, short *peer_version); // Routine to close a named service -extern int32_t vchi_service_close(const VCHI_SERVICE_HANDLE_T handle); +extern int32_t vchi_service_close(const struct vchi_service_handle *handle); // Routine to increment ref count on a named service -extern int32_t vchi_service_use(const VCHI_SERVICE_HANDLE_T handle); +extern int32_t vchi_service_use(const struct vchi_service_handle *handle); // Routine to decrement ref count on a named service -extern int32_t vchi_service_release(const VCHI_SERVICE_HANDLE_T handle); +extern int32_t vchi_service_release(const struct vchi_service_handle *handle); // Routine to set a control option for a named service -extern int32_t vchi_service_set_option(const VCHI_SERVICE_HANDLE_T handle, +extern int32_t vchi_service_set_option(const struct vchi_service_handle *handle, enum vchi_service_option option, int value); /* Routine to send a message from kernel memory across a service */ extern int -vchi_queue_kernel_message(VCHI_SERVICE_HANDLE_T handle, +vchi_queue_kernel_message(struct vchi_service_handle *handle, void *data, unsigned int size); /* Routine to send a message from user memory across a service */ extern int -vchi_queue_user_message(VCHI_SERVICE_HANDLE_T handle, +vchi_queue_user_message(struct vchi_service_handle *handle, void __user *data, unsigned int size); // Routine to receive a msg from a service // Dequeue is equivalent to hold, copy into client buffer, release -extern int32_t vchi_msg_dequeue(VCHI_SERVICE_HANDLE_T handle, +extern int32_t vchi_msg_dequeue(struct vchi_service_handle *handle, void *data, uint32_t max_data_size_to_read, uint32_t *actual_msg_size, @@ -131,26 +131,26 @@ extern int32_t vchi_msg_dequeue(VCHI_SERVICE_HANDLE_T handle, // Routine to look at a message in place. // The message is not dequeued, so a subsequent call to peek or dequeue // will return the same message. -extern int32_t vchi_msg_peek(VCHI_SERVICE_HANDLE_T handle, +extern int32_t vchi_msg_peek(struct vchi_service_handle *handle, void **data, uint32_t *msg_size, enum vchi_flags flags); // Routine to remove a message after it has been read in place with peek // The first message on the queue is dequeued. -extern int32_t vchi_msg_remove(VCHI_SERVICE_HANDLE_T handle); +extern int32_t vchi_msg_remove(struct vchi_service_handle *handle); // 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(VCHI_SERVICE_HANDLE_T handle, +extern int32_t vchi_msg_hold(struct vchi_service_handle *handle, void **data, // } may be NULL, as info can be uint32_t *msg_size, // } obtained from HELD_MSG_T enum vchi_flags flags, 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, +extern int32_t vchi_msg_look_ahead(struct vchi_service_handle *handle, struct vchi_msg_iter *iter, enum vchi_flags flags); @@ -202,21 +202,21 @@ extern int32_t vchi_msg_iter_hold_next(struct vchi_msg_iter *iter, *****************************************************************************/ // Routine to prepare interface for a transfer from the other side -extern int32_t vchi_bulk_queue_receive(VCHI_SERVICE_HANDLE_T handle, +extern int32_t vchi_bulk_queue_receive(struct vchi_service_handle *handle, void *data_dst, uint32_t data_size, enum vchi_flags flags, void *transfer_handle); // Prepare interface for a transfer from the other side into relocatable memory. -int32_t vchi_bulk_queue_receive_reloc(const VCHI_SERVICE_HANDLE_T handle, +int32_t vchi_bulk_queue_receive_reloc(const struct vchi_service_handle *handle, uint32_t offset, uint32_t data_size, const enum vchi_flags flags, void * const bulk_handle); // Routine to queue up data ready for transfer to the other (once they have signalled they are ready) -extern int32_t vchi_bulk_queue_transmit(VCHI_SERVICE_HANDLE_T handle, +extern int32_t vchi_bulk_queue_transmit(struct vchi_service_handle *handle, const void *data_src, uint32_t data_size, enum vchi_flags flags, @@ -230,7 +230,7 @@ extern int32_t vchi_bulk_queue_transmit(VCHI_SERVICE_HANDLE_T handle, } #endif -extern int32_t vchi_bulk_queue_transmit_reloc(VCHI_SERVICE_HANDLE_T handle, +extern int32_t vchi_bulk_queue_transmit_reloc(struct vchi_service_handle *handle, uint32_t offset, uint32_t data_size, enum vchi_flags flags, 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 0227c3f27697..fe2bb49815ae 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c @@ -23,7 +23,7 @@ struct shim_service { /*********************************************************** * Name: vchi_msg_peek * - * Arguments: const VCHI_SERVICE_HANDLE_T handle, + * Arguments: struct vchi_service_handle *handle, * void **data, * uint32_t *msg_size, @@ -36,7 +36,7 @@ struct shim_service { * Returns: int32_t - success == 0 * ***********************************************************/ -int32_t vchi_msg_peek(VCHI_SERVICE_HANDLE_T handle, +int32_t vchi_msg_peek(struct vchi_service_handle *handle, void **data, uint32_t *msg_size, enum vchi_flags flags) @@ -63,7 +63,7 @@ EXPORT_SYMBOL(vchi_msg_peek); /*********************************************************** * Name: vchi_msg_remove * - * Arguments: const VCHI_SERVICE_HANDLE_T handle, + * Arguments: struct vchi_service_handle *handle, * * Description: Routine to remove a message (after it has been read with * vchi_msg_peek) @@ -71,7 +71,7 @@ EXPORT_SYMBOL(vchi_msg_peek); * Returns: int32_t - success == 0 * ***********************************************************/ -int32_t vchi_msg_remove(VCHI_SERVICE_HANDLE_T handle) +int32_t vchi_msg_remove(struct vchi_service_handle *handle) { struct shim_service *service = (struct shim_service *)handle; struct vchiq_header *header; @@ -87,7 +87,7 @@ EXPORT_SYMBOL(vchi_msg_remove); /*********************************************************** * Name: vchi_msg_queue * - * Arguments: VCHI_SERVICE_HANDLE_T handle, + * Arguments: struct vchi_service_handle *handle, * ssize_t (*copy_callback)(void *context, void *dest, * size_t offset, size_t maxsize), * void *context, @@ -99,7 +99,7 @@ EXPORT_SYMBOL(vchi_msg_remove); * ***********************************************************/ static -int32_t vchi_msg_queue(VCHI_SERVICE_HANDLE_T handle, +int32_t vchi_msg_queue(struct vchi_service_handle *handle, ssize_t (*copy_callback)(void *context, void *dest, size_t offset, size_t maxsize), void *context, @@ -139,7 +139,7 @@ vchi_queue_kernel_message_callback(void *context, } int -vchi_queue_kernel_message(VCHI_SERVICE_HANDLE_T handle, +vchi_queue_kernel_message(struct vchi_service_handle *handle, void *data, unsigned int size) { @@ -169,7 +169,7 @@ vchi_queue_user_message_callback(void *context, } int -vchi_queue_user_message(VCHI_SERVICE_HANDLE_T handle, +vchi_queue_user_message(struct vchi_service_handle *handle, void __user *data, unsigned int size) { @@ -198,7 +198,7 @@ EXPORT_SYMBOL(vchi_queue_user_message); * Returns: int32_t - success == 0 * ***********************************************************/ -int32_t vchi_bulk_queue_receive(VCHI_SERVICE_HANDLE_T handle, void *data_dst, +int32_t vchi_bulk_queue_receive(struct vchi_service_handle *handle, void *data_dst, uint32_t data_size, enum vchi_flags flags, void *bulk_handle) { @@ -256,7 +256,7 @@ EXPORT_SYMBOL(vchi_bulk_queue_receive); * Returns: int32_t - success == 0 * ***********************************************************/ -int32_t vchi_bulk_queue_transmit(VCHI_SERVICE_HANDLE_T handle, +int32_t vchi_bulk_queue_transmit(struct vchi_service_handle *handle, const void *data_src, uint32_t data_size, enum vchi_flags flags, @@ -307,7 +307,7 @@ EXPORT_SYMBOL(vchi_bulk_queue_transmit); /*********************************************************** * Name: vchi_msg_dequeue * - * Arguments: VCHI_SERVICE_HANDLE_T handle, + * Arguments: struct vchi_service_handle *handle, * void *data, * uint32_t max_data_size_to_read, * uint32_t *actual_msg_size @@ -318,7 +318,7 @@ EXPORT_SYMBOL(vchi_bulk_queue_transmit); * Returns: int32_t - success == 0 * ***********************************************************/ -int32_t vchi_msg_dequeue(VCHI_SERVICE_HANDLE_T handle, void *data, +int32_t vchi_msg_dequeue(struct vchi_service_handle *handle, void *data, uint32_t max_data_size_to_read, uint32_t *actual_msg_size, enum vchi_flags flags) { @@ -376,7 +376,7 @@ EXPORT_SYMBOL(vchi_held_msg_release); /*********************************************************** * Name: vchi_msg_hold * - * Arguments: VCHI_SERVICE_HANDLE_T handle, + * Arguments: struct vchi_service_handle *handle, * void **data, * uint32_t *msg_size, * enum vchi_flags flags, @@ -390,7 +390,7 @@ EXPORT_SYMBOL(vchi_held_msg_release); * Returns: int32_t - success == 0 * ***********************************************************/ -int32_t vchi_msg_hold(VCHI_SERVICE_HANDLE_T handle, void **data, +int32_t vchi_msg_hold(struct vchi_service_handle *handle, void **data, uint32_t *msg_size, enum vchi_flags flags, struct vchi_held_msg *message_handle) { @@ -495,7 +495,7 @@ EXPORT_SYMBOL(vchi_disconnect); * * Arguments: struct vchi_instance_handle *instance_handle * struct service_creation *setup, - * VCHI_SERVICE_HANDLE_T *handle + * struct vchi_service_handle **handle * * Description: Routine to open a service * @@ -595,12 +595,12 @@ static void service_free(struct shim_service *service) int32_t vchi_service_open(struct vchi_instance_handle *instance_handle, struct service_creation *setup, - VCHI_SERVICE_HANDLE_T *handle) + struct vchi_service_handle **handle) { VCHIQ_INSTANCE_T instance = (VCHIQ_INSTANCE_T)instance_handle; struct shim_service *service = service_alloc(instance, setup); - *handle = (VCHI_SERVICE_HANDLE_T)service; + *handle = (struct vchi_service_handle *)service; if (service) { struct vchiq_service_params params; @@ -626,7 +626,7 @@ int32_t vchi_service_open(struct vchi_instance_handle *instance_handle, } EXPORT_SYMBOL(vchi_service_open); -int32_t vchi_service_close(const VCHI_SERVICE_HANDLE_T handle) +int32_t vchi_service_close(const struct vchi_service_handle *handle) { int32_t ret = -1; struct shim_service *service = (struct shim_service *)handle; @@ -642,7 +642,7 @@ int32_t vchi_service_close(const VCHI_SERVICE_HANDLE_T handle) } EXPORT_SYMBOL(vchi_service_close); -int32_t vchi_service_destroy(const VCHI_SERVICE_HANDLE_T handle) +int32_t vchi_service_destroy(const struct vchi_service_handle *handle) { int32_t ret = -1; struct shim_service *service = (struct shim_service *)handle; @@ -661,7 +661,7 @@ int32_t vchi_service_destroy(const VCHI_SERVICE_HANDLE_T handle) } EXPORT_SYMBOL(vchi_service_destroy); -int32_t vchi_service_set_option(const VCHI_SERVICE_HANDLE_T handle, +int32_t vchi_service_set_option(const struct vchi_service_handle *handle, enum vchi_service_option option, int value) { @@ -692,7 +692,7 @@ int32_t vchi_service_set_option(const VCHI_SERVICE_HANDLE_T handle, } EXPORT_SYMBOL(vchi_service_set_option); -int32_t vchi_get_peer_version(const VCHI_SERVICE_HANDLE_T handle, short *peer_version) +int32_t vchi_get_peer_version(const struct vchi_service_handle *handle, short *peer_version) { int32_t ret = -1; struct shim_service *service = (struct shim_service *)handle; @@ -710,14 +710,14 @@ EXPORT_SYMBOL(vchi_get_peer_version); /*********************************************************** * Name: vchi_service_use * - * Arguments: const VCHI_SERVICE_HANDLE_T handle + * Arguments: const struct vchi_service_handle *handle * * Description: Routine to increment refcount on a service * * Returns: void * ***********************************************************/ -int32_t vchi_service_use(const VCHI_SERVICE_HANDLE_T handle) +int32_t vchi_service_use(const struct vchi_service_handle *handle) { int32_t ret = -1; @@ -731,14 +731,14 @@ EXPORT_SYMBOL(vchi_service_use); /*********************************************************** * Name: vchi_service_release * - * Arguments: const VCHI_SERVICE_HANDLE_T handle + * Arguments: const struct vchi_service_handle *handle * * Description: Routine to decrement refcount on a service * * Returns: void * ***********************************************************/ -int32_t vchi_service_release(const VCHI_SERVICE_HANDLE_T handle) +int32_t vchi_service_release(const struct vchi_service_handle *handle) { int32_t ret = -1; -- cgit v1.2.3-59-g8ed1b From 0ff3c366a7eb53f1c12f6d6ddb08b68c89841dcb Mon Sep 17 00:00:00 2001 From: Jamal Shareef Date: Tue, 5 Nov 2019 14:55:20 -0800 Subject: staging: vc04_services: Rename callback VCHI_CALLBACK_T to vchi_callback Renames callback function pointer typedef VCHI_CALLBACK_T to vchi_callback to better match kernel code style. Signed-off-by: Jamal Shareef Link: https://lore.kernel.org/r/0b0f85060b38e6195fe2d58989621e7b09eafe51.1572994235.git.jamal.k.shareef@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vc04_services/interface/vchi/vchi.h | 2 +- drivers/staging/vc04_services/interface/vchi/vchi_common.h | 6 +++--- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/staging/vc04_services/interface/vchi/vchi.h') diff --git a/drivers/staging/vc04_services/interface/vchi/vchi.h b/drivers/staging/vc04_services/interface/vchi/vchi.h index 05fb5c3e8ba0..56b1037d8e25 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi.h @@ -45,7 +45,7 @@ struct vchi_held_msg { struct service_creation { struct vchi_version version; int32_t service_id; - VCHI_CALLBACK_T callback; + vchi_callback callback; void *callback_param; }; diff --git a/drivers/staging/vc04_services/interface/vchi/vchi_common.h b/drivers/staging/vc04_services/interface/vchi/vchi_common.h index c99735fc0308..141af16ce031 100644 --- a/drivers/staging/vc04_services/interface/vchi/vchi_common.h +++ b/drivers/staging/vc04_services/interface/vchi/vchi_common.h @@ -86,9 +86,9 @@ enum vchi_service_option { }; //Callback used by all services / bulk transfers -typedef void (*VCHI_CALLBACK_T)(void *callback_param, //my service local param - enum vchi_callback_reason reason, - void *handle); //for transmitting msg's only +typedef void (*vchi_callback)(void *callback_param, //my service local param + enum vchi_callback_reason reason, + void *handle); //for transmitting msg's only /* * Define vector struct for scatter-gather (vector) operations 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 fe2bb49815ae..dd35147df3ac 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_shim.c @@ -16,7 +16,7 @@ struct shim_service { struct vchiu_queue queue; - VCHI_CALLBACK_T callback; + vchi_callback callback; void *callback_param; }; -- cgit v1.2.3-59-g8ed1b