Commit fb22360d authored by Jamal Shareef's avatar Jamal Shareef Committed by Greg Kroah-Hartman
Browse files

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: default avatarJamal Shareef <jamal.k.shareef@gmail.com>
Link: https://lore.kernel.org/r/0b481a90b8a2b9cd6718e972dab681854ff312d7.1572994235.git.jamal.k.shareef@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c3a12cc1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 = {
+1 −1
Original line number Diff line number Diff line
@@ -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 */
+1 −1
Original line number Diff line number Diff line
@@ -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,
+6 −6
Original line number Diff line number Diff line
@@ -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);

+9 −9
Original line number Diff line number Diff line
@@ -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)
{