Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ee5d1b7f2a01ce4d95ca247b5a499b72f31cdbe8
Commit:     ee5d1b7f2a01ce4d95ca247b5a499b72f31cdbe8
Parent:     86affd5a00a92e491e5f00ed659492767519fdf7
Author:     Christian Krafft <[EMAIL PROTECTED]>
AuthorDate: Thu Jun 28 21:14:38 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Mon Jul 2 10:35:58 2007 +1000

    [POWERPC] Fix PMI breakage in cbe_cbufreq driver
    
    The recent change to cell_defconfig to enable cpufreq on Cell exposed
    the fact that the cbe_cpufreq driver currently needs the PMI interface
    code to compile, but Kconfig doesn't make sure that the PMI interface
    code gets built if cbe_cpufreq is enabled.
    
    In fact cbe_cpufreq can work without PMI, so this ifdefs out the code
    that deals with PMI.  This is a minimal solution for 2.6.22; a more
    comprehensive solution will be merged for 2.6.23.
    
    Signed-off-by: Christian Krafft <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/cell/cbe_cpufreq.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/platforms/cell/cbe_cpufreq.c 
b/arch/powerpc/platforms/cell/cbe_cpufreq.c
index ac44599..ab511d5 100644
--- a/arch/powerpc/platforms/cell/cbe_cpufreq.c
+++ b/arch/powerpc/platforms/cell/cbe_cpufreq.c
@@ -74,6 +74,7 @@ static unsigned int pmi_frequency_limit = 0;
 
 static struct of_device *pmi_dev;
 
+#ifdef CONFIG_PPC_PMI
 static int set_pmode_pmi(int cpu, unsigned int pmode)
 {
        int ret;
@@ -102,7 +103,7 @@ static int set_pmode_pmi(int cpu, unsigned int pmode)
 #endif
        return ret;
 }
-
+#endif
 
 static int get_pmode(int cpu)
 {
@@ -157,9 +158,11 @@ static int set_pmode_reg(int cpu, unsigned int pmode)
 }
 
 static int set_pmode(int cpu, unsigned int slow_mode) {
+#ifdef CONFIG_PPC_PMI
        if (pmi_dev)
                return set_pmode_pmi(cpu, slow_mode);
        else
+#endif
                return set_pmode_reg(cpu, slow_mode);
 }
 
@@ -323,26 +326,28 @@ static struct cpufreq_driver cbe_cpufreq_driver = {
 
 static int __init cbe_cpufreq_init(void)
 {
+#ifdef CONFIG_PPC_PMI
        struct device_node *np;
-
+#endif
        if (!machine_is(cell))
                return -ENODEV;
-
+#ifdef CONFIG_PPC_PMI
        np = of_find_node_by_type(NULL, "ibm,pmi");
 
        pmi_dev = of_find_device_by_node(np);
 
        if (pmi_dev)
                pmi_register_handler(pmi_dev, &cbe_pmi_handler);
-
+#endif
        return cpufreq_register_driver(&cbe_cpufreq_driver);
 }
 
 static void __exit cbe_cpufreq_exit(void)
 {
+#ifdef CONFIG_PPC_PMI
        if (pmi_dev)
                pmi_unregister_handler(pmi_dev, &cbe_pmi_handler);
-
+#endif
        cpufreq_unregister_driver(&cbe_cpufreq_driver);
 }
 
-
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