mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
staging: vchiq_arm: Drop vchiq_arm_init_state
After removal of struct vchiq_2835_state, the init of vchiq_arm_state can be simplified by doing it directly within vchiq_platform_init_state. Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/20240621131958.98208-7-wahrenst@gmx.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
4e2766102d
commit
7852f7357e
|
|
@ -588,23 +588,6 @@ static int vchiq_platform_init(struct platform_device *pdev, struct vchiq_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)
|
||||
{
|
||||
|
|
@ -614,7 +597,15 @@ vchiq_platform_init_state(struct vchiq_state *state)
|
|||
if (!platform_state)
|
||||
return -ENOMEM;
|
||||
|
||||
vchiq_arm_init_state(state, platform_state);
|
||||
rwlock_init(&platform_state->susp_res_lock);
|
||||
|
||||
init_completion(&platform_state->ka_evt);
|
||||
atomic_set(&platform_state->ka_use_count, 0);
|
||||
atomic_set(&platform_state->ka_use_ack_count, 0);
|
||||
atomic_set(&platform_state->ka_release_count, 0);
|
||||
|
||||
platform_state->state = state;
|
||||
|
||||
state->platform_state = (struct opaque_platform_state *)platform_state;
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user