From patchwork Fri Aug 10 11:20:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 10673 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 7879523ECF for ; Fri, 10 Aug 2012 11:21:32 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 47294A18B77 for ; Fri, 10 Aug 2012 11:21:32 +0000 (UTC) Received: by ggnf1 with SMTP id f1so1439959ggn.11 for ; Fri, 10 Aug 2012 04:21:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=FnUXEhuAsQTCDW7Wc8+LvUjPJhdv73UXNZ6qCtvqJzU=; b=Fy9H3YE1r0kwJvN2W9ohZmL6VXI81Ph2vprdGEVLMvRNG90jNQ+/emdYztPm19JCLZ m32V39kbQQ7OLqZ04rCGJHqmUWK84Up0JG7QnhfmtP4CXxEf6GJY2Xh+fOtb4MLMk7Td Y4S5OwfUTFdPwvAz5m13/am5iparTTXycJFgFB0LmXjRwgmp3by4/AO9Xu2EL95NbsHo DRi3fAJnDews9S4qHvKB51krtA9xV2KKmUQ2OdQCTowaTOdDQeLyeMirYHspSywUmHhE wXXmPHUujqOIkyE+s4okqgg3S3XFOywH9ti44aq5IgOajG+Mo5LG+spnFk3ce7dZuVRw Irow== Received: by 10.50.94.133 with SMTP id dc5mr1379372igb.16.1344597691568; Fri, 10 Aug 2012 04:21:31 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.200 with SMTP id ew8csp55273igc; Fri, 10 Aug 2012 04:21:31 -0700 (PDT) Received: by 10.101.18.8 with SMTP id v8mr797866ani.14.1344597691031; Fri, 10 Aug 2012 04:21:31 -0700 (PDT) Received: from mail-yw0-f50.google.com (mail-yw0-f50.google.com [209.85.213.50]) by mx.google.com with ESMTPS id h6si3740252yhk.112.2012.08.10.04.21.30 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 10 Aug 2012 04:21:31 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.213.50 is neither permitted nor denied by best guess record for domain of hongbo.zhang@linaro.org) client-ip=209.85.213.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.213.50 is neither permitted nor denied by best guess record for domain of hongbo.zhang@linaro.org) smtp.mail=hongbo.zhang@linaro.org Received: by yhjj63 with SMTP id j63so1652950yhj.37 for ; Fri, 10 Aug 2012 04:21:30 -0700 (PDT) Received: by 10.66.78.195 with SMTP id d3mr5670368pax.17.1344597690332; Fri, 10 Aug 2012 04:21:30 -0700 (PDT) Received: from stebjsxu0148.bjs.st.com ([124.127.135.94]) by mx.google.com with ESMTPS id sk5sm3181042pbc.7.2012.08.10.04.21.25 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 10 Aug 2012 04:21:29 -0700 (PDT) From: "hongbo.zhang" To: linaro-dev@lists.linaro.org Cc: patches@linaro.org, linaro-kernel@lists.linaro.org, STEricsson_nomadik_linux@list.st.com, kernel@igloocommunity.org, "hongbo.zhang" Subject: [PATCH 1/2] Thermal: Move struct thermal_cooling_device_instance to thermal.h Date: Fri, 10 Aug 2012 19:20:13 +0800 Message-Id: <1344597614-13998-2-git-send-email-hongbo.zhang@linaro.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1344597614-13998-1-git-send-email-hongbo.zhang@linaro.com> References: <1344597614-13998-1-git-send-email-hongbo.zhang@linaro.com> X-Gm-Message-State: ALoCoQlLRnSUWWEjQ+RjbxMbQ3yB233WalN6lgroGVJAz6Y2A21bq1yqqR3QzWXy1Y+RfkAtJK7H From: "hongbo.zhang" A thermal driver may need to walk through the cooling devices binded to itself, which are listed in cooling_devices of thermal_zone_device, and this goal cannot be achieved without moving this structure declaration to the public header file. Signed-off-by: hongbo.zhang --- drivers/thermal/thermal_sys.c | 11 ----------- include/linux/thermal.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index 2ab31e4..0c5900f 100644 --- a/drivers/thermal/thermal_sys.c +++ b/drivers/thermal/thermal_sys.c @@ -41,17 +41,6 @@ MODULE_AUTHOR("Zhang Rui"); MODULE_DESCRIPTION("Generic thermal management sysfs support"); MODULE_LICENSE("GPL"); -struct thermal_cooling_device_instance { - int id; - char name[THERMAL_NAME_LENGTH]; - struct thermal_zone_device *tz; - struct thermal_cooling_device *cdev; - int trip; - char attr_name[THERMAL_NAME_LENGTH]; - struct device_attribute attr; - struct list_head node; -}; - static DEFINE_IDR(thermal_tz_idr); static DEFINE_IDR(thermal_cdev_idr); static DEFINE_MUTEX(thermal_idr_lock); diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 4b94a61..3b05f37 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -119,6 +119,18 @@ struct thermal_zone_device { struct list_head node; struct delayed_work poll_queue; }; + +struct thermal_cooling_device_instance { + int id; + char name[THERMAL_NAME_LENGTH]; + struct thermal_zone_device *tz; + struct thermal_cooling_device *cdev; + int trip; + char attr_name[THERMAL_NAME_LENGTH]; + struct device_attribute attr; + struct list_head node; +}; + /* Adding event notification support elements */ #define THERMAL_GENL_FAMILY_NAME "thermal_event" #define THERMAL_GENL_VERSION 0x01