From patchwork Tue Oct 10 18:02:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 9996953 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2B76B60216 for ; Tue, 10 Oct 2017 18:11:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20D0928701 for ; Tue, 10 Oct 2017 18:11:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 131182870F; Tue, 10 Oct 2017 18:11:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 90DE528701 for ; Tue, 10 Oct 2017 18:11:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932574AbdJJSFG (ORCPT ); Tue, 10 Oct 2017 14:05:06 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:50742 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932488AbdJJSFE (ORCPT ); Tue, 10 Oct 2017 14:05:04 -0400 Received: by mail-wm0-f53.google.com with SMTP id u138so7492185wmu.5 for ; Tue, 10 Oct 2017 11:05:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1G2xHEuBbX6i9kBTr3QpkoabQbUUI5A3+20IBgzvXZ0=; b=i39jn3YUxxlCJEuIUyfg270z6JPFyhU2DLTbIfSHoNxxIBemiKlPEIp/wCpnRAZyZv hEAPmF11okTsZts8YTNRhcWmRnOEm72Kcylb/PMDfFldzdYpTLw8H/eLQYTnK93nXPvf IDgPMRuFNcl1Os9MNDOF9j1Kz+byQ2dzHi+q0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1G2xHEuBbX6i9kBTr3QpkoabQbUUI5A3+20IBgzvXZ0=; b=sd+lQ+sbcDPh2io5ATo+/+5OTVD2wguCa2yu8KIJKsimCs+aSTS12tOYZBpqmRJfh6 OXhU/cxcbWnZoG5tAStZjBg+8aNvImAIUtSDynYW31LRMdjT0mnwAH0GepfXEgoe8Rbo 5WUIFm/jQ7nMJSMp2OWhpJPPRDjS7ykp6NNvD/96o7+3fA8TZ/CwNzYEQ31300qSgzvC Wu+n2h2LLA2MfmMMNt0Mjvv73ryph2U3GQXD0boMnZjIjXd4Pxb1W0c4I52ufNP8JE85 vJEClgCGroFKiQU894oCSlQr1h1b9QWWlaX/pd500FaWRVEX0I+t6vTy4Re4/Hx0ddcw 6bGw== X-Gm-Message-State: AMCzsaUD/UL1VnGDDCP5H8SkNxwi/nij7Bxz33S2ClJon+zBHJlrdxMT vsHiF8PbeMMThmobQlsK+GKi5Q== X-Google-Smtp-Source: AOwi7QCRHVScGeOKVOGkXFYmYcfF4JkjHs+HlZlsKPp7VaUMuLlIgB5movbR61BZVgjtm2vckP5/sA== X-Received: by 10.28.247.9 with SMTP id v9mr12737160wmh.104.1507658703217; Tue, 10 Oct 2017 11:05:03 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:4f9:3ae1:43d2:31ae]) by smtp.gmail.com with ESMTPSA id l73sm12513428wmd.47.2017.10.10.11.05.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Oct 2017 11:05:02 -0700 (PDT) From: Daniel Lezcano To: edubezval@gmail.com, rui.zhang@intel.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, kevin.wangtao@linaro.org, Leo Yan Subject: [PATCH 10/25] thermal/drivers/hisi: Rename and remove unused field Date: Tue, 10 Oct 2017 20:02:35 +0200 Message-Id: <1507658570-32675-10-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507658570-32675-1-git-send-email-daniel.lezcano@linaro.org> References: <79a5f10c-0fb7-3e4f-caac-c1625904b137@linaro.org> <1507658570-32675-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Rename the 'sensors' field to 'sensor' as we describe only one sensor. Remove the 'sensor_temp' as it is no longer used. Signed-off-by: Daniel Lezcano Reviewed-by: Leo Yan Tested-by: Leo Yan --- drivers/thermal/hisi_thermal.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c index 5b3e681..70dc373 100644 --- a/drivers/thermal/hisi_thermal.c +++ b/drivers/thermal/hisi_thermal.c @@ -49,8 +49,6 @@ struct hisi_thermal_sensor { struct hisi_thermal_data *thermal; struct thermal_zone_device *tzd; - - long sensor_temp; uint32_t id; uint32_t thres_temp; }; @@ -59,9 +57,9 @@ struct hisi_thermal_data { struct mutex thermal_lock; /* protects register data */ struct platform_device *pdev; struct clk *clk; - struct hisi_thermal_sensor sensors; - int irq; + struct hisi_thermal_sensor sensor; void __iomem *regs; + int irq; }; /* @@ -233,7 +231,7 @@ static struct thermal_zone_of_device_ops hisi_of_thermal_ops = { static irqreturn_t hisi_thermal_alarm_irq_thread(int irq, void *dev) { struct hisi_thermal_data *data = dev; - struct hisi_thermal_sensor *sensor = &data->sensors; + struct hisi_thermal_sensor *sensor = &data->sensor; int temp; hisi_thermal_alarm_clear(data->regs, 1); @@ -244,7 +242,7 @@ static irqreturn_t hisi_thermal_alarm_irq_thread(int irq, void *dev) dev_crit(&data->pdev->dev, "THERMAL ALARM: %d > %d\n", temp, sensor->thres_temp); - thermal_zone_device_update(data->sensors.tzd, + thermal_zone_device_update(data->sensor.tzd, THERMAL_EVENT_UNSPECIFIED); } else if (temp < sensor->thres_temp) { @@ -307,7 +305,7 @@ static int hisi_thermal_setup(struct hisi_thermal_data *data) { struct hisi_thermal_sensor *sensor; - sensor = &data->sensors; + sensor = &data->sensor; /* disable module firstly */ hisi_thermal_reset_enable(data->regs, 0); @@ -380,7 +378,7 @@ static int hisi_thermal_probe(struct platform_device *pdev) } ret = hisi_thermal_register_sensor(pdev, data, - &data->sensors, + &data->sensor, HISI_DEFAULT_SENSOR); if (ret) { dev_err(&pdev->dev, "failed to register thermal sensor: %d\n", @@ -402,7 +400,7 @@ static int hisi_thermal_probe(struct platform_device *pdev) return ret; } - hisi_thermal_toggle_sensor(&data->sensors, true); + hisi_thermal_toggle_sensor(&data->sensor, true); return 0; } @@ -410,7 +408,7 @@ static int hisi_thermal_probe(struct platform_device *pdev) static int hisi_thermal_remove(struct platform_device *pdev) { struct hisi_thermal_data *data = platform_get_drvdata(pdev); - struct hisi_thermal_sensor *sensor = &data->sensors; + struct hisi_thermal_sensor *sensor = &data->sensor; hisi_thermal_toggle_sensor(sensor, false); hisi_thermal_disable_sensor(data);