Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6070b5de50ab5e3f810628a9cbb04deecf30a85f
Commit:     6070b5de50ab5e3f810628a9cbb04deecf30a85f
Parent:     dd184a01b8ece6bac2f7a63de99a4a4d29552746
Author:     Satyam Sharma <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 2 13:28:15 2007 -0700
Committer:  Dave Jones <[EMAIL PROTECTED]>
CommitDate: Thu Oct 4 18:40:57 2007 -0400

    [CPUFREQ] implement !CONFIG_CPU_FREQ stub for  cpufreq_unregister_notifier()
    
    Callsites such as arch/powerpc/oprofile/op_model_cell.c are having to
    open-code #ifdef CONFIG_CPU_FREQ only to be able to get at the full 
definition
    of cpufreq_unregister_notifier(), because no empty stub is available for the
    !CONFIG_CPU_FREQ case.  Let's provide one, to be able to remove such 
#ifdef's
    from the rest of the kernel tree -- those will come in a subsequent patch.
    
    Signed-off-by: Satyam Sharma <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Dave Jones <[EMAIL PROTECTED]>
---
 include/linux/cpufreq.h |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 450a841..23932d7 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -32,12 +32,24 @@
  *                     CPUFREQ NOTIFIER INTERFACE                    *
  *********************************************************************/
 
-int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list);
-int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list);
-
 #define CPUFREQ_TRANSITION_NOTIFIER    (0)
 #define CPUFREQ_POLICY_NOTIFIER                (1)
 
+#ifdef CONFIG_CPU_FREQ
+int cpufreq_register_notifier(struct notifier_block *nb, unsigned int list);
+int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list);
+#else          /* CONFIG_CPU_FREQ */
+static inline int cpufreq_register_notifier(struct notifier_block *nb,
+                                               unsigned int list)
+{
+       return 0;
+}
+static inline int cpufreq_unregister_notifier(struct notifier_block *nb,
+                                               unsigned int list)
+{
+       return 0;
+}
+#endif         /* CONFIG_CPU_FREQ */
 
 /* if (cpufreq_driver->target) exists, the ->governor decides what frequency
  * within the limits is used. If (cpufreq_driver->setpolicy> exists, these
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to