staging: vchiq_arm: re-order vchiq_arm_init_state

This moves vchiq_arm_init_state() above its caller, so we can drop the
now unnecessary forward declaration and make the function static.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1633264369-998-2-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Stefan Wahren 2021-10-03 14:32:47 +02:00 коммит произвёл Greg Kroah-Hartman
Родитель fbf6fafe5a
Коммит 631c5a5312
2 изменённых файлов: 17 добавлений и 21 удалений

Просмотреть файл

@ -509,6 +509,23 @@ int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state)
return 0;
}
static void
vchiq_arm_init_state(struct vchiq_state *state,
struct vchiq_arm_state *arm_state)
{
if (arm_state) {
rwlock_init(&arm_state->susp_res_lock);
init_completion(&arm_state->ka_evt);
atomic_set(&arm_state->ka_use_count, 0);
atomic_set(&arm_state->ka_use_ack_count, 0);
atomic_set(&arm_state->ka_release_count, 0);
arm_state->state = state;
arm_state->first_connect = 0;
}
}
int
vchiq_platform_init_state(struct vchiq_state *state)
{
@ -1324,23 +1341,6 @@ exit:
return 0;
}
void
vchiq_arm_init_state(struct vchiq_state *state,
struct vchiq_arm_state *arm_state)
{
if (arm_state) {
rwlock_init(&arm_state->susp_res_lock);
init_completion(&arm_state->ka_evt);
atomic_set(&arm_state->ka_use_count, 0);
atomic_set(&arm_state->ka_use_ack_count, 0);
atomic_set(&arm_state->ka_release_count, 0);
arm_state->state = state;
arm_state->first_connect = 0;
}
}
int
vchiq_use_internal(struct vchiq_state *state, struct vchiq_service *service,
enum USE_TYPE_E use_type)

Просмотреть файл

@ -127,10 +127,6 @@ int vchiq_platform_init(struct platform_device *pdev,
extern struct vchiq_state *
vchiq_get_state(void);
extern void
vchiq_arm_init_state(struct vchiq_state *state,
struct vchiq_arm_state *arm_state);
extern void
vchiq_check_suspend(struct vchiq_state *state);
enum vchiq_status