]> xenbits.xensource.com Git - people/royger/linux-2.6.18-xen.git/commitdiff
linux: small ACPI processor external control code adjustments
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 17 Mar 2010 08:32:52 +0000 (08:32 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 17 Mar 2010 08:32:52 +0000 (08:32 +0000)
- don't send a change notification to Xen before having sent an init
  one
- fix a bogus preprocessor directive

Signed-off-by: Jan Beulich <jbeulich@novell.com>
arch/i386/kernel/acpi/processor_extcntl_xen.c
drivers/acpi/processor_perflib.c

index 752b1e027c74171c0a54638de3fb35757cbf19c0..eb6a53e9572c137da505a7d4970b1a5b7e1c522d 100644 (file)
@@ -117,6 +117,8 @@ static int xen_px_notifier(struct acpi_processor *pr, int action)
 
        perf = &op.u.set_pminfo.u.perf;
        px = pr->performance;
+       if (!px)
+               return -EINVAL;
 
        switch(action) {
        case PROCESSOR_PM_CHANGE:
index 64160bdfa71c3c4d7bbe9dcf08bd604d911b2ce4..aae0d887114aef947409f2da5ccb9644fdf02779 100644 (file)
@@ -141,7 +141,7 @@ int acpi_processor_ppc_has_changed(struct acpi_processor *pr)
        else
 #ifdef CONFIG_CPU_FREQ
                return cpufreq_update_policy(pr->id);
-#elif CONFIG_PROCESSOR_EXTERNAL_CONTROL
+#elif defined(CONFIG_PROCESSOR_EXTERNAL_CONTROL)
                return processor_notify_external(pr,
                                PROCESSOR_PM_CHANGE, PM_TYPE_PERF);
 #endif