From patchwork Tue Oct 1 09:15:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 2969011 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C09F89F288 for ; Tue, 1 Oct 2013 09:16:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2E40E2017D for ; Tue, 1 Oct 2013 09:16:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EF2072016C for ; Tue, 1 Oct 2013 09:16:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752901Ab3JAJQT (ORCPT ); Tue, 1 Oct 2013 05:16:19 -0400 Received: from mga09.intel.com ([134.134.136.24]:47376 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752875Ab3JAJQS (ORCPT ); Tue, 1 Oct 2013 05:16:18 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 01 Oct 2013 02:13:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.90,1012,1371106800"; d="scan'208";a="403564170" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.173]) by fmsmga001.fm.intel.com with ESMTP; 01 Oct 2013 02:16:15 -0700 Received: from andy by smile with local (Exim 4.80) (envelope-from ) id 1VQw3h-0008Lt-RB; Tue, 01 Oct 2013 12:15:57 +0300 From: Andy Shevchenko To: Zhang Rui , "Rafael J. Wysocki" , linux-acpi@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH] ACPI / thermal: fix trivial compilation error Date: Tue, 1 Oct 2013 12:15:56 +0300 Message-Id: <1380618956-32051-1-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 1.8.4.rc3 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Previous patch didn't move callback function definitions before usage, thus we end up with ea compilation error. This patch fixes it. Signed-off-by: Andy Shevchenko --- drivers/acpi/thermal.c | 73 ++++++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 35 deletions(-) diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 4c6e0a4..9230c36 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -978,6 +978,44 @@ static void acpi_thermal_notify(struct acpi_device *device, u32 event) } } +static int thermal_act(const struct dmi_system_id *d) { + + if (act == 0) { + pr_notice(PREFIX "%s detected: " + "disabling all active thermal trip points\n", d->ident); + act = -1; + } + return 0; +} + +static int thermal_nocrt(const struct dmi_system_id *d) { + + pr_notice(PREFIX "%s detected: " + "disabling all critical thermal trip point actions.\n", d->ident); + nocrt = 1; + return 0; +} + +static int thermal_tzp(const struct dmi_system_id *d) { + + if (tzp == 0) { + pr_notice(PREFIX "%s detected: " + "enabling thermal zone polling\n", d->ident); + tzp = 300; /* 300 dS = 30 Seconds */ + } + return 0; +} + +static int thermal_psv(const struct dmi_system_id *d) { + + if (psv == 0) { + pr_notice(PREFIX "%s detected: " + "disabling all passive thermal trip points\n", d->ident); + psv = -1; + } + return 0; +} + static struct dmi_system_id thermal_dmi_table[] __initdata = { /* * Award BIOS on this AOpen makes thermal control almost worthless. @@ -1199,39 +1237,4 @@ static int acpi_thermal_resume(struct device *dev) } #endif -static int thermal_act(const struct dmi_system_id *d) { - - if (act == 0) { - pr_notice(PREFIX "%s detected: " - "disabling all active thermal trip points\n", d->ident); - act = -1; - } - return 0; -} -static int thermal_nocrt(const struct dmi_system_id *d) { - - pr_notice(PREFIX "%s detected: " - "disabling all critical thermal trip point actions.\n", d->ident); - nocrt = 1; - return 0; -} -static int thermal_tzp(const struct dmi_system_id *d) { - - if (tzp == 0) { - pr_notice(PREFIX "%s detected: " - "enabling thermal zone polling\n", d->ident); - tzp = 300; /* 300 dS = 30 Seconds */ - } - return 0; -} -static int thermal_psv(const struct dmi_system_id *d) { - - if (psv == 0) { - pr_notice(PREFIX "%s detected: " - "disabling all passive thermal trip points\n", d->ident); - psv = -1; - } - return 0; -} - module_acpi_driver(acpi_thermal_driver);