ARM: davinci: fix davinci_cpufreq_init() declaration
authorArnd Bergmann <arnd@arndb.de>
Tue, 16 May 2023 15:30:57 +0000 (17:30 +0200)
committerArnd Bergmann <arnd@arndb.de>
Fri, 26 May 2023 11:31:31 +0000 (13:31 +0200)
The davinci_cpufreq_init() declaration is only seen by its caller
but not the definition:

drivers/cpufreq/davinci-cpufreq.c:153:12: error: no previous prototype for 'davinci_cpufreq_init'

Move it into the platform_data header that is already used an
interface between the two places.

Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20230516153109.514251-2-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/mach-davinci/common.c
arch/arm/mach-davinci/common.h
include/linux/platform_data/davinci-cpufreq.h

index c1ce6b2..7bc7018 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/etherdevice.h>
 #include <linux/davinci_emac.h>
 #include <linux/dma-mapping.h>
+#include <linux/platform_data/davinci-cpufreq.h>
 
 #include <asm/tlb.h>
 #include <asm/mach/map.h>
index b4fd0e9..8aa6d4f 100644 (file)
@@ -55,12 +55,6 @@ extern void davinci_common_init(const struct davinci_soc_info *soc_info);
 extern void davinci_init_ide(void);
 void davinci_init_late(void);
 
-#ifdef CONFIG_CPU_FREQ
-int davinci_cpufreq_init(void);
-#else
-static inline int davinci_cpufreq_init(void) { return 0; }
-#endif
-
 #ifdef CONFIG_SUSPEND
 int davinci_pm_init(void);
 #else
index bc208c6..1ef91c3 100644 (file)
@@ -16,4 +16,10 @@ struct davinci_cpufreq_config {
        int (*init)(void);
 };
 
+#ifdef CONFIG_CPU_FREQ
+int davinci_cpufreq_init(void);
+#else
+static inline int davinci_cpufreq_init(void) { return 0; }
+#endif
+
 #endif /* _MACH_DAVINCI_CPUFREQ_H */