drm/panfrost: avoid static declaration
authorClément Péron <peron.clem@gmail.com>
Fri, 10 Jul 2020 09:53:56 +0000 (11:53 +0200)
committerRob Herring <robh@kernel.org>
Fri, 7 Aug 2020 16:11:26 +0000 (10:11 -0600)
This declaration can be avoided so change it.

Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Signed-off-by: Clément Péron <peron.clem@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200710095409.407087-2-peron.clem@gmail.com
drivers/gpu/drm/panfrost/panfrost_devfreq.c

index 4139870..1b560b9 100644 (file)
 #include "panfrost_gpu.h"
 #include "panfrost_regs.h"
 
-static void panfrost_devfreq_update_utilization(struct panfrost_device *pfdev);
+static void panfrost_devfreq_update_utilization(struct panfrost_device *pfdev)
+{
+       ktime_t now;
+       ktime_t last;
+
+       if (!pfdev->devfreq.devfreq)
+               return;
+
+       now = ktime_get();
+       last = pfdev->devfreq.time_last_update;
+
+       if (atomic_read(&pfdev->devfreq.busy_count) > 0)
+               pfdev->devfreq.busy_time += ktime_sub(now, last);
+       else
+               pfdev->devfreq.idle_time += ktime_sub(now, last);
+
+       pfdev->devfreq.time_last_update = now;
+}
 
 static int panfrost_devfreq_target(struct device *dev, unsigned long *freq,
                                   u32 flags)
@@ -139,25 +156,6 @@ void panfrost_devfreq_suspend(struct panfrost_device *pfdev)
        devfreq_suspend_device(pfdev->devfreq.devfreq);
 }
 
-static void panfrost_devfreq_update_utilization(struct panfrost_device *pfdev)
-{
-       ktime_t now;
-       ktime_t last;
-
-       if (!pfdev->devfreq.devfreq)
-               return;
-
-       now = ktime_get();
-       last = pfdev->devfreq.time_last_update;
-
-       if (atomic_read(&pfdev->devfreq.busy_count) > 0)
-               pfdev->devfreq.busy_time += ktime_sub(now, last);
-       else
-               pfdev->devfreq.idle_time += ktime_sub(now, last);
-
-       pfdev->devfreq.time_last_update = now;
-}
-
 void panfrost_devfreq_record_busy(struct panfrost_device *pfdev)
 {
        panfrost_devfreq_update_utilization(pfdev);