From patchwork Tue Sep 24 08:08:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 2931951 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DCFF4BFF05 for ; Tue, 24 Sep 2013 08:08:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5B8562024F for ; Tue, 24 Sep 2013 08:08:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B0F8820365 for ; Tue, 24 Sep 2013 08:08:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750784Ab3IXIIs (ORCPT ); Tue, 24 Sep 2013 04:08:48 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:44855 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752804Ab3IXIIn (ORCPT ); Tue, 24 Sep 2013 04:08:43 -0400 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MTM001Y4EMFRB20@mailout4.samsung.com>; Tue, 24 Sep 2013 17:08:39 +0900 (KST) X-AuditID: cbfee61b-b7f776d0000016c8-56-52414887ca89 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 65.92.05832.78841425; Tue, 24 Sep 2013 17:08:39 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MTM00AMYEM05Z20@mmp1.samsung.com>; Tue, 24 Sep 2013 17:08:39 +0900 (KST) From: Lukasz Majewski To: Zhang Rui , Eduardo Valentin , Amit Daniel Kachhap Cc: "Rafael J. Wysocki" , Linux PM list , Jonghwa Lee , Lukasz Majewski , Lukasz Majewski , linux-kernel , Bartlomiej Zolnierkiewicz , Tomasz Figa , Myungjoo Ham , devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 1/6] thermal: exynos: fix: Return from exynos_report_trigger() when therm_dev is NULL Date: Tue, 24 Sep 2013 10:08:17 +0200 Message-id: <1380010102-25817-2-git-send-email-l.majewski@samsung.com> X-Mailer: git-send-email 1.7.10 In-reply-to: <1380010102-25817-1-git-send-email-l.majewski@samsung.com> References: <1380010102-25817-1-git-send-email-l.majewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrNLMWRmVeSWpSXmKPExsVy+t9jAd12D8cgg/Vr9S0aroZYbJyxntVi /pFzrBZr9v9ksug8+4TZ4s0jbos3DzczWlzeNYfN4nPvEUaLGef3MVncblzBZtG/sJfJ4snD PjaL9TNeszjweSze85LJY920t8wefVtWMXo8WtzC6HH8xnYmj8+b5ALYorhsUlJzMstSi/Tt Ergyrq/8wFown6tiV8cjlgbGZxxdjJwcEgImEvumdDBD2GISF+6tZ+ti5OIQEljEKHFn9ksW CKeLSaL/VRsbSBWbgJ7E57tPmUASIgJNjBI/jnwDa2cWOMYs8WWVCIgtLJAu0blmBxOIzSKg KtF2YgkriM0r4CZx/+RXRoh18hJP7/eBDeUUcJdofzoFLC4EVPP20VaWCYy8CxgZVjGKphYk FxQnpeca6RUn5haX5qXrJefnbmIEB+kz6R2MqxosDjEKcDAq8fBeSHAIEmJNLCuuzD3EKMHB rCTCe8PWMUiINyWxsiq1KD++qDQntfgQozQHi5I478FW60AhgfTEktTs1NSC1CKYLBMHp1QD Y9m36KLb8ao3J67uiHhzedfju29/a1s/ePUgtnHH5almbB0JVz7k+aQVhidZHP13pvvhRafy p1/XL/pt7hq7c9fGAAaDsEaDa/FxEr/zT7wO8dNcctbFUfbmvlm7Jh13Ewu0Zo60Fku+fuqT utme+PwHVZoFN3c/uB4gWWovurd05uens4+zLldiKc5INNRiLipOBACwpWUhTgIAAA== Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, 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 The commit 4de0bdaa9677d11406c9becb70c60887c957e1f0 ("thermal: exynos: Add support for instance based register/unregister") broke check for presence of therm_dev at global thermal zone in exynos_report_trigger(). The resulting wrong test prevents thermal_zone_device_update() call, which calls handlers for situation when trip points are passed. Such behavior prevents thermal driver from proper reaction (when TMU interrupt is raised) in a situation when overheating is detected at TMU hardware. This patch fixes it. Signed-off-by: Lukasz Majewski Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Tomasz Figa Reviewed-by: Amit Daniel Kachhap --- drivers/thermal/samsung/exynos_thermal_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/thermal/samsung/exynos_thermal_common.c b/drivers/thermal/samsung/exynos_thermal_common.c index f10a6ad..55a912a 100644 --- a/drivers/thermal/samsung/exynos_thermal_common.c +++ b/drivers/thermal/samsung/exynos_thermal_common.c @@ -310,7 +310,7 @@ void exynos_report_trigger(struct thermal_sensor_conf *conf) } th_zone = conf->pzone_data; - if (th_zone->therm_dev) + if (!th_zone->therm_dev) return; if (th_zone->bind == false) {