staging: vchiq_arm: move platform structs to vchiq_arm.c
authorStefan Wahren <stefan.wahren@i2se.com>
Sun, 3 Oct 2021 12:32:49 +0000 (14:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 Oct 2021 10:21:46 +0000 (12:21 +0200)
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 <stefan.wahren@i2se.com>
Link: https://lore.kernel.org/r/1633264369-998-4-git-send-email-stefan.wahren@i2se.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.h

index 9c424e1..6fbafdf 100644 (file)
@@ -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;
index c77d5ab..2aa46b1 100644 (file)
@@ -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;