mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 22:53:55 +08:00
staging: vc04_services: Fix indentation
This should fix the indentation issues found by checkpatch. Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
946d61ace1
commit
f306ed07d1
@ -61,8 +61,8 @@
|
||||
#define BELL2 0x08
|
||||
|
||||
typedef struct vchiq_2835_state_struct {
|
||||
int inited;
|
||||
VCHIQ_ARM_STATE_T arm_state;
|
||||
int inited;
|
||||
VCHIQ_ARM_STATE_T arm_state;
|
||||
} VCHIQ_2835_ARM_STATE_T;
|
||||
|
||||
struct vchiq_pagelist_info {
|
||||
@ -195,31 +195,31 @@ int vchiq_platform_init(struct platform_device *pdev, VCHIQ_STATE_T *state)
|
||||
|
||||
vchiq_call_connected_callbacks();
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
VCHIQ_STATUS_T
|
||||
vchiq_platform_init_state(VCHIQ_STATE_T *state)
|
||||
{
|
||||
VCHIQ_STATUS_T status = VCHIQ_SUCCESS;
|
||||
state->platform_state = kzalloc(sizeof(VCHIQ_2835_ARM_STATE_T), GFP_KERNEL);
|
||||
((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->inited = 1;
|
||||
status = vchiq_arm_init_state(state, &((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->arm_state);
|
||||
if(status != VCHIQ_SUCCESS)
|
||||
{
|
||||
((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->inited = 0;
|
||||
}
|
||||
return status;
|
||||
VCHIQ_STATUS_T status = VCHIQ_SUCCESS;
|
||||
state->platform_state = kzalloc(sizeof(VCHIQ_2835_ARM_STATE_T), GFP_KERNEL);
|
||||
((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->inited = 1;
|
||||
status = vchiq_arm_init_state(state, &((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->arm_state);
|
||||
if(status != VCHIQ_SUCCESS)
|
||||
{
|
||||
((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->inited = 0;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
VCHIQ_ARM_STATE_T*
|
||||
vchiq_platform_get_arm_state(VCHIQ_STATE_T *state)
|
||||
{
|
||||
if(!((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->inited)
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
return &((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->arm_state;
|
||||
if(!((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->inited)
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
return &((VCHIQ_2835_ARM_STATE_T*)state->platform_state)->arm_state;
|
||||
}
|
||||
|
||||
void
|
||||
@ -295,13 +295,13 @@ vchiq_dump_platform_state(void *dump_context)
|
||||
VCHIQ_STATUS_T
|
||||
vchiq_platform_suspend(VCHIQ_STATE_T *state)
|
||||
{
|
||||
return VCHIQ_ERROR;
|
||||
return VCHIQ_ERROR;
|
||||
}
|
||||
|
||||
VCHIQ_STATUS_T
|
||||
vchiq_platform_resume(VCHIQ_STATE_T *state)
|
||||
{
|
||||
return VCHIQ_SUCCESS;
|
||||
return VCHIQ_SUCCESS;
|
||||
}
|
||||
|
||||
void
|
||||
@ -317,13 +317,13 @@ vchiq_platform_resumed(VCHIQ_STATE_T *state)
|
||||
int
|
||||
vchiq_platform_videocore_wanted(VCHIQ_STATE_T* state)
|
||||
{
|
||||
return 1; // autosuspend not supported - videocore always wanted
|
||||
return 1; // autosuspend not supported - videocore always wanted
|
||||
}
|
||||
|
||||
int
|
||||
vchiq_platform_use_suspend_timer(void)
|
||||
{
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
void
|
||||
vchiq_dump_platform_use_state(VCHIQ_STATE_T *state)
|
||||
|
@ -665,7 +665,7 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
USER_SERVICE_T *user_service =
|
||||
(USER_SERVICE_T *)service->base.userdata;
|
||||
/* close_pending is false on first entry, and when the
|
||||
wait in vchiq_close_service has been interrupted. */
|
||||
wait in vchiq_close_service has been interrupted. */
|
||||
if (!user_service->close_pending) {
|
||||
status = vchiq_close_service(service->handle);
|
||||
if (status != VCHIQ_SUCCESS)
|
||||
@ -691,7 +691,7 @@ vchiq_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
USER_SERVICE_T *user_service =
|
||||
(USER_SERVICE_T *)service->base.userdata;
|
||||
/* close_pending is false on first entry, and when the
|
||||
wait in vchiq_close_service has been interrupted. */
|
||||
wait in vchiq_close_service has been interrupted. */
|
||||
if (!user_service->close_pending) {
|
||||
status = vchiq_remove_service(service->handle);
|
||||
if (status != VCHIQ_SUCCESS)
|
||||
|
@ -154,7 +154,7 @@ vchiq_check_resume(VCHIQ_STATE_T *state);
|
||||
|
||||
extern void
|
||||
vchiq_check_suspend(VCHIQ_STATE_T *state);
|
||||
VCHIQ_STATUS_T
|
||||
VCHIQ_STATUS_T
|
||||
vchiq_use_service(VCHIQ_SERVICE_HANDLE_T handle);
|
||||
|
||||
extern VCHIQ_STATUS_T
|
||||
|
@ -3507,20 +3507,20 @@ release_message_sync(VCHIQ_STATE_T *state, VCHIQ_HEADER_T *header)
|
||||
VCHIQ_STATUS_T
|
||||
vchiq_get_peer_version(VCHIQ_SERVICE_HANDLE_T handle, short *peer_version)
|
||||
{
|
||||
VCHIQ_STATUS_T status = VCHIQ_ERROR;
|
||||
VCHIQ_SERVICE_T *service = find_service_by_handle(handle);
|
||||
VCHIQ_STATUS_T status = VCHIQ_ERROR;
|
||||
VCHIQ_SERVICE_T *service = find_service_by_handle(handle);
|
||||
|
||||
if (!service ||
|
||||
(vchiq_check_service(service) != VCHIQ_SUCCESS) ||
|
||||
!peer_version)
|
||||
goto exit;
|
||||
*peer_version = service->peer_version;
|
||||
status = VCHIQ_SUCCESS;
|
||||
if (!service ||
|
||||
(vchiq_check_service(service) != VCHIQ_SUCCESS) ||
|
||||
!peer_version)
|
||||
goto exit;
|
||||
*peer_version = service->peer_version;
|
||||
status = VCHIQ_SUCCESS;
|
||||
|
||||
exit:
|
||||
if (service)
|
||||
unlock_service(service);
|
||||
return status;
|
||||
if (service)
|
||||
unlock_service(service);
|
||||
return status;
|
||||
}
|
||||
|
||||
VCHIQ_STATUS_T
|
||||
@ -3814,7 +3814,7 @@ vchiq_dump_service_state(void *dump_context, VCHIQ_SERVICE_T *service)
|
||||
service->stats.bulk_stalls,
|
||||
service->stats.bulk_aborted_count,
|
||||
service->stats.error_count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vchiq_dump(dump_context, buf, len + 1);
|
||||
|
@ -75,13 +75,13 @@ VCHIQ_STATUS_T vchiq_initialise(VCHIQ_INSTANCE_T *instance_out)
|
||||
VCHIQ_STATUS_T status = VCHIQ_ERROR;
|
||||
VCHIQ_STATE_T *state;
|
||||
VCHIQ_INSTANCE_T instance = NULL;
|
||||
int i;
|
||||
int i;
|
||||
|
||||
vchiq_log_trace(vchiq_core_log_level, "%s called", __func__);
|
||||
|
||||
/* VideoCore may not be ready due to boot up timing.
|
||||
It may never be ready if kernel and firmware are mismatched, so don't block forever. */
|
||||
for (i=0; i<VCHIQ_INIT_RETRIES; i++) {
|
||||
/* VideoCore may not be ready due to boot up timing.
|
||||
It may never be ready if kernel and firmware are mismatched, so don't block forever. */
|
||||
for (i=0; i<VCHIQ_INIT_RETRIES; i++) {
|
||||
state = vchiq_get_state();
|
||||
if (state)
|
||||
break;
|
||||
|
@ -527,7 +527,7 @@ static VCHIQ_STATUS_T shim_callback(VCHIQ_REASON_T reason,
|
||||
SHIM_SERVICE_T *service =
|
||||
(SHIM_SERVICE_T *)VCHIQ_GET_SERVICE_USERDATA(handle);
|
||||
|
||||
if (!service->callback)
|
||||
if (!service->callback)
|
||||
goto release;
|
||||
|
||||
switch (reason) {
|
||||
@ -577,7 +577,7 @@ static VCHIQ_STATUS_T shim_callback(VCHIQ_REASON_T reason,
|
||||
}
|
||||
|
||||
release:
|
||||
vchiq_release_message(service->handle, header);
|
||||
vchiq_release_message(service->handle, header);
|
||||
done:
|
||||
return VCHIQ_SUCCESS;
|
||||
}
|
||||
@ -741,14 +741,16 @@ EXPORT_SYMBOL(vchi_service_set_option);
|
||||
|
||||
int32_t vchi_get_peer_version( const VCHI_SERVICE_HANDLE_T handle, short *peer_version )
|
||||
{
|
||||
int32_t ret = -1;
|
||||
SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle;
|
||||
if(service)
|
||||
{
|
||||
VCHIQ_STATUS_T status = vchiq_get_peer_version(service->handle, peer_version);
|
||||
ret = vchiq_status_to_vchi( status );
|
||||
}
|
||||
return ret;
|
||||
int32_t ret = -1;
|
||||
SHIM_SERVICE_T *service = (SHIM_SERVICE_T *)handle;
|
||||
if(service)
|
||||
{
|
||||
VCHIQ_STATUS_T status;
|
||||
|
||||
status = vchiq_get_peer_version(service->handle, peer_version);
|
||||
ret = vchiq_status_to_vchi( status );
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(vchi_get_peer_version);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user