From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: [PATCH] linux: small ACPI processor external control code adjustments Date: Tue, 16 Mar 2010 10:57:28 +0000 Message-ID: <4B9F722802000078000351D3@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org - don't send a change notification to Xen before having sent an init one - fix a bogus preprocessor directive Signed-off-by: Jan Beulich --- a/arch/i386/kernel/acpi/processor_extcntl_xen.c +++ b/arch/i386/kernel/acpi/processor_extcntl_xen.c @@ -117,6 +117,8 @@ static int xen_px_notifier(struct acpi_p =20 perf =3D &op.u.set_pminfo.u.perf; px =3D pr->performance; + if (!px) + return -EINVAL; =20 switch(action) { case PROCESSOR_PM_CHANGE: --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c @@ -141,7 +141,7 @@ int acpi_processor_ppc_has_changed(struc 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