Moved the *_HAVE_READ defines: *_submit may only be included when *_read is included...
[collectd.git] / src / cpufreq.c
index 6806c3e..9d74c57 100644 (file)
@@ -85,6 +85,7 @@ static void cpufreq_write (char *host, char *inst, char *val)
        rrd_update_file (host, file, val, ds_def, ds_num);
 }
 
+#if CPUFREQ_HAVE_READ
 static void cpufreq_submit (int cpu_num, unsigned long long val)
 {
        char buf[BUFSIZE];
@@ -97,7 +98,6 @@ static void cpufreq_submit (int cpu_num, unsigned long long val)
        plugin_submit (MODULE_NAME, cpu, buf);
 }
 
-#if CPUFREQ_HAVE_READ
 static void cpufreq_read (void)
 {
 #ifdef KERNEL_LINUX