Skip to contentSkip to conversation

core: split out sysfs interface to extra file

PATCH In review Dominik Brodowski 1 participant 1 message Jan 29, 2005 CPU frequency scaling framework

lore
Share & tools
lore
#0 lore raw

PATCH 3/5 core: split out sysfs interface to extra file

Move the sysfs interface to cpufreq to a different file. It splits out quite nicely.

---

 drivers/cpufreq/Makefile        |    2
 drivers/cpufreq/cpufreq.c       |  288 -------------------------------------
 drivers/cpufreq/cpufreq_core.h  |   21 ++

drivers/cpufreq/cpufreq_sysfs.c | 308 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 336 insertions(+), 283 deletions(-)

drivers/cpufreq/Makefile +1 -1
Index: 2.6.11-rc2+/drivers/cpufreq/Makefile
===================================================================
@@ -1,5 +1,5 @@
 # CPUfreq core
-obj-$(CONFIG_CPU_FREQ)			+= cpufreq.o
+obj-$(CONFIG_CPU_FREQ)			+= cpufreq.o cpufreq_sysfs.o
 # CPUfreq stats
 obj-$(CONFIG_CPU_FREQ_STAT)             += cpufreq_stats.o
 
drivers/cpufreq/cpufreq.c +6 -282

312 lines not on this page · raw message

drivers/cpufreq/cpufreq_core.h +21 -0
Index: 2.6.11-rc2+/drivers/cpufreq/cpufreq_core.h
===================================================================
@@ -0,0 +1,21 @@
+/*
+ *  linux/drivers/cpufreq/cpufreq_core.h - header for cpufreq core files
+ *
+ *  Copyright (C) 2001 Russell King
+ *            (C) 2002 - 2005 Dominik Brodowski <[email protected]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+/* cpufreq.c */
+extern struct cpufreq_driver		*cpufreq_driver;
+extern struct list_head			cpufreq_governor_list;
+extern struct semaphore			cpufreq_governor_sem;
+
+/* cpufreq_sysfs.c */
+extern struct kobj_type			ktype_cpufreq;
+extern struct freq_attr			cpuinfo_cur_freq;
+extern struct freq_attr			scaling_cur_freq;
drivers/cpufreq/cpufreq_sysfs.c +308 -0

308 lines not on this page · raw message