From 6649335e1f0c3482a3a86840afdb2448ceb6bff1 Mon Sep 17 00:00:00 2001 From: Stefan Wahren Date: Sun, 3 Oct 2021 14:32:49 +0200 Subject: [PATCH] staging: vchiq_arm: move platform structs to vchiq_arm.c After merging vchiq_2835_arm.c into vchiq_arm.c some platform structs doesn't need to exported anymore. So move them into the C file. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1633264369-998-4-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman --- .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 39 ++++++++++++++++++++++ .../vc04_services/interface/vchiq_arm/vchiq_arm.h | 39 ---------------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index 9c424e1..6fbafdf 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -68,6 +68,11 @@ struct vchiq_state g_state; static struct platform_device *bcm2835_camera; static struct platform_device *bcm2835_audio; +struct vchiq_drvdata { + const unsigned int cache_line_size; + struct rpi_firmware *fw; +}; + static struct vchiq_drvdata bcm2835_drvdata = { .cache_line_size = 32, }; @@ -76,6 +81,40 @@ static struct vchiq_drvdata bcm2836_drvdata = { .cache_line_size = 64, }; +struct vchiq_arm_state { + /* Keepalive-related data */ + struct task_struct *ka_thread; + struct completion ka_evt; + atomic_t ka_use_count; + atomic_t ka_use_ack_count; + atomic_t ka_release_count; + + rwlock_t susp_res_lock; + + struct vchiq_state *state; + + /* + * Global use count for videocore. + * This is equal to the sum of the use counts for all services. When + * this hits zero the videocore suspend procedure will be initiated. + */ + int videocore_use_count; + + /* + * Use count to track requests from videocore peer. + * This use count is not associated with a service, so needs to be + * tracked separately with the state. + */ + int peer_use_count; + + /* + * Flag to indicate that the first vchiq connect has made it through. + * This means that both sides should be fully ready, and we should + * be able to suspend after this point. + */ + int first_connect; +}; + struct vchiq_2835_state { int inited; struct vchiq_arm_state arm_state; diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h index c77d5ab..2aa46b1 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h @@ -25,45 +25,6 @@ enum USE_TYPE_E { USE_TYPE_VCHIQ }; -struct vchiq_arm_state { - /* Keepalive-related data */ - struct task_struct *ka_thread; - struct completion ka_evt; - atomic_t ka_use_count; - atomic_t ka_use_ack_count; - atomic_t ka_release_count; - - rwlock_t susp_res_lock; - - struct vchiq_state *state; - - /* - * Global use count for videocore. - * This is equal to the sum of the use counts for all services. When - * this hits zero the videocore suspend procedure will be initiated. - */ - int videocore_use_count; - - /* - * Use count to track requests from videocore peer. - * This use count is not associated with a service, so needs to be - * tracked separately with the state. - */ - int peer_use_count; - - /* - * Flag to indicate that the first vchiq connect has made it through. - * This means that both sides should be fully ready, and we should - * be able to suspend after this point. - */ - int first_connect; -}; - -struct vchiq_drvdata { - const unsigned int cache_line_size; - struct rpi_firmware *fw; -}; - struct user_service { struct vchiq_service *service; void __user *userdata; -- 2.7.4