From patchwork Tue Oct 9 05:53:57 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 1568751 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C78C8DFFCF for ; Tue, 9 Oct 2012 06:10:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752751Ab2JIGKh (ORCPT ); Tue, 9 Oct 2012 02:10:37 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:38957 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752698Ab2JIGCr (ORCPT ); Tue, 9 Oct 2012 02:02:47 -0400 Received: by mail-qc0-f174.google.com with SMTP id d3so3587711qch.19 for ; Mon, 08 Oct 2012 23:02:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:reply-to:organization; bh=d6iJKSEqFBhLgsLxLe7ltj9CGc1pZNSutVzkxCRleXk=; b=keWLjUzMFDOYEWdLXdfZe8PYKhuofhUrjFt8HBD2Oq51zQjc5Tn5XMrVjXzJZZCraw fdPRewdAkjVo3npGLeLpKI4v/itAxCrRNzayIvXAyojUTfL6pWqxfJKNxMjbmVoYQ7WY q1R8neJW78KYEwgfuZdomT89g03d/3ladnHRAWavLGwo6DD7uUkOcUnorkhtmou6A+nv 6mUMsfXRPZSGhrxg8UfV6hKYNwtDh+zMYHblnRSPLQw3q0mdDcP3iJfn3KSr9H4aOs0x V2pMRmvEfsy1/Y8P4fc/A62BIroLbXugXJtOx9YRyJdiP4jWhJD5RoBuOpfiKmQF//Cm uM/Q== Received: by 10.224.58.134 with SMTP id g6mr15507036qah.40.1349762566549; Mon, 08 Oct 2012 23:02:46 -0700 (PDT) Received: from x980.localdomain6 (pool-74-104-146-186.bstnma.fios.verizon.net. [74.104.146.186]) by mx.google.com with ESMTPS id ck11sm20206037qab.17.2012.10.08.23.02.38 (version=SSLv3 cipher=OTHER); Mon, 08 Oct 2012 23:02:45 -0700 (PDT) From: Len Brown To: linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Zhang Rui Subject: [PATCH 07/30] Thermal: rename structure thermal_cooling_device_instance to thermal_instance Date: Tue, 9 Oct 2012 01:53:57 -0400 Message-Id: X-Mailer: git-send-email 1.8.0.rc1 In-Reply-To: <1349762060-25334-1-git-send-email-lenb@kernel.org> References: <1349762060-25334-1-git-send-email-lenb@kernel.org> In-Reply-To: References: Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Zhang Rui This struct is used to describe the behavior for a thermal cooling device on a certain trip point for a certain thremal zone. thermal_cooling_device_instance is not accurate, as a cooling device can be used for more than one trip point in one thermal zone device. Signed-off-by: Zhang Rui Reviewed-by: Rafael J. Wysocki Reviewed-by: Eduardo Valentin --- drivers/thermal/thermal_sys.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index 735e6e6..3eba397 100644 --- a/drivers/thermal/thermal_sys.c +++ b/drivers/thermal/thermal_sys.c @@ -46,7 +46,7 @@ MODULE_LICENSE("GPL"); * a certain cooling device on a certain trip point * in a certain thermal zone */ -struct thermal_cooling_device_instance { +struct thermal_instance { int id; char name[THERMAL_NAME_LENGTH]; struct thermal_zone_device *tz; @@ -430,10 +430,10 @@ static ssize_t thermal_cooling_device_trip_point_show(struct device *dev, struct device_attribute *attr, char *buf) { - struct thermal_cooling_device_instance *instance; + struct thermal_instance *instance; instance = - container_of(attr, struct thermal_cooling_device_instance, attr); + container_of(attr, struct thermal_instance, attr); if (instance->trip == THERMAL_TRIPS_NONE) return sprintf(buf, "-1\n"); @@ -716,7 +716,7 @@ static void thermal_zone_device_passive(struct thermal_zone_device *tz, int temp, int trip_temp, int trip) { enum thermal_trend trend; - struct thermal_cooling_device_instance *instance; + struct thermal_instance *instance; struct thermal_cooling_device *cdev; long state, max_state; @@ -812,8 +812,8 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, struct thermal_cooling_device *cdev, unsigned long upper, unsigned long lower) { - struct thermal_cooling_device_instance *dev; - struct thermal_cooling_device_instance *pos; + struct thermal_instance *dev; + struct thermal_instance *pos; struct thermal_zone_device *pos1; struct thermal_cooling_device *pos2; unsigned long max_state; @@ -844,7 +844,7 @@ int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz, return -EINVAL; dev = - kzalloc(sizeof(struct thermal_cooling_device_instance), GFP_KERNEL); + kzalloc(sizeof(struct thermal_instance), GFP_KERNEL); if (!dev) return -ENOMEM; dev->tz = tz; @@ -909,7 +909,7 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz, int trip, struct thermal_cooling_device *cdev) { - struct thermal_cooling_device_instance *pos, *next; + struct thermal_instance *pos, *next; mutex_lock(&tz->lock); list_for_each_entry_safe(pos, next, &tz->cooling_devices, node) { @@ -1095,7 +1095,7 @@ EXPORT_SYMBOL(thermal_cooling_device_unregister); static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip, long temp) { - struct thermal_cooling_device_instance *instance; + struct thermal_instance *instance; struct thermal_cooling_device *cdev = NULL; unsigned long cur_state, max_state; long trip_temp;