From patchwork Fri Jun 17 08:01:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Forbes X-Patchwork-Id: 890492 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5H825mL018085 for ; Fri, 17 Jun 2011 08:02:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756802Ab1FQICC (ORCPT ); Fri, 17 Jun 2011 04:02:02 -0400 Received: from mail-iy0-f174.google.com ([209.85.210.174]:34207 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751994Ab1FQICB (ORCPT ); Fri, 17 Jun 2011 04:02:01 -0400 Received: by iyb14 with SMTP id 14so1767169iyb.19 for ; Fri, 17 Jun 2011 01:02:00 -0700 (PDT) Received: by 10.42.150.6 with SMTP id y6mr1656264icv.409.1308297720183; Fri, 17 Jun 2011 01:02:00 -0700 (PDT) Received: from localhost.localdomain (ip-118-90-129-85.xdsl.xnet.co.nz [118.90.129.85]) by mx.google.com with ESMTPS id j1sm1301424ibg.38.2011.06.17.01.01.56 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 17 Jun 2011 01:01:59 -0700 (PDT) From: Chris Forbes To: Zhang Rui Cc: Len Brown , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Forbes Subject: [PATCH] Drivers: acpi: thermal: fix coding style issues Date: Fri, 17 Jun 2011 20:01:36 +1200 Message-Id: <1308297696-29837-1-git-send-email-chrisf@ijw.co.nz> X-Mailer: git-send-email 1.7.4.1 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 17 Jun 2011 08:02:06 +0000 (UTC) Fixed some coding style issues flagged by checkpatch.pl Signed-off-by: Chris Forbes --- drivers/acpi/thermal.c | 30 ++++++++++++++++++------------ 1 files changed, 18 insertions(+), 12 deletions(-) diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 2607e17..c3d1080 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include @@ -173,7 +173,7 @@ struct acpi_thermal_flags { }; struct acpi_thermal { - struct acpi_device * device; + struct acpi_device *device; acpi_bus_id name; unsigned long temperature; unsigned long last_temperature; @@ -405,8 +405,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) printk(KERN_WARNING PREFIX "Invalid passive threshold\n"); tz->trips.passive.flags.valid = 0; - } - else + } else tz->trips.passive.flags.valid = 1; if (memcmp(&tz->trips.passive.devices, &devices, @@ -460,7 +459,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) } name[2] = 'L'; - if ((flag & ACPI_TRIPS_DEVICES) && tz->trips.active[i].flags.valid ) { + if ((flag & ACPI_TRIPS_DEVICES) && tz->trips.active[i].flags.valid) { memset(&devices, 0, sizeof(struct acpi_handle_list)); status = acpi_evaluate_reference(tz->device->handle, name, NULL, &devices); @@ -468,8 +467,7 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag) printk(KERN_WARNING PREFIX "Invalid active%d threshold\n", i); tz->trips.active[i].flags.valid = 0; - } - else + } else tz->trips.active[i].flags.valid = 1; if (memcmp(&tz->trips.active[i].devices, &devices, @@ -841,7 +839,8 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz) trips++; for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE && - tz->trips.active[i].flags.valid; i++, trips++); + tz->trips.active[i].flags.valid; i++, trips++) + ; if (tz->trips.passive.flags.valid) tz->thermal_zone = @@ -1075,7 +1074,8 @@ static int acpi_thermal_resume(struct acpi_device *device) return AE_OK; } -static int thermal_act(const struct dmi_system_id *d) { +static int thermal_act(const struct dmi_system_id *d) +{ if (act == 0) { printk(KERN_NOTICE "ACPI: %s detected: " @@ -1084,14 +1084,18 @@ static int thermal_act(const struct dmi_system_id *d) { } return 0; } -static int thermal_nocrt(const struct dmi_system_id *d) { + +static int thermal_nocrt(const struct dmi_system_id *d) +{ printk(KERN_NOTICE "ACPI: %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) { + +static int thermal_tzp(const struct dmi_system_id *d) +{ if (tzp == 0) { printk(KERN_NOTICE "ACPI: %s detected: " @@ -1100,7 +1104,9 @@ static int thermal_tzp(const struct dmi_system_id *d) { } return 0; } -static int thermal_psv(const struct dmi_system_id *d) { + +static int thermal_psv(const struct dmi_system_id *d) +{ if (psv == 0) { printk(KERN_NOTICE "ACPI: %s detected: "