From patchwork Mon Sep 4 19:56:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 111612 Delivered-To: patch@linaro.org Received: by 10.140.94.166 with SMTP id g35csp1936417qge; Mon, 4 Sep 2017 12:59:23 -0700 (PDT) X-Received: by 10.99.163.26 with SMTP id s26mr1540827pge.445.1504555162971; Mon, 04 Sep 2017 12:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504555162; cv=none; d=google.com; s=arc-20160816; b=OrFroatK2WdICaa5Hldu4sV/Sdu68C4CUlkRax2Qt2gaIDoQ+8bZCD0Q5s+ZtFRJnS t/D6R2tIZncMxHZpkWWzozRbnFxQ6MryXSKGf/WdPFuaKIZR/kTujUw7SfR3adYRp4PN 7axWlgtaxDNzjbIsRJl2SnfSYgw113sjFKiwxvE8n4lxyjbohKwU601uCo+83LOSZ8S6 reWnJULgj1YOj4SKRcNtIgPqzE9HzClRr1aJx5M5/xR37rDSnUFA+ighlvtzUssGZhYW ZRRFyRZ+0q7EVKZoEvBAjs3kFJn7xYLHTpJUC0C70BUeURi3LrWo5OMRT2uXQMYUgXco y4aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=Sl8kFBccEl9fqk9O939IU3v3CW6Ryl8QJZmHbj4c6A8=; b=i3lMKpVE6E3JVMIlTPpovlzg2jbNqMhOPSctulnCTSgHtDO5BZrIrE3LgF4+Hwz87C bUjbAhS9yldhSMHOM80bK7cIKyyCtSdKpjAXqQu5bS6SDNGjbY0tdI/3S2z56ceWimK1 K2hIZaYH7rXvJ+0uQ4WF9VzjUZDXXQw+DRyB8vbl5MsXmmoxtiDJJd4SjhSP826DeRDh jfiC3nw+E+BXO51O1fG7VirSIG0h6DBN9iFbfDciyK6FvHntyNmschJUQDI/emAb0HhR 6gTndfW1jST6Mu+0OYUXXpd7YOoKZpAJJbUM7WydmWJWcdH5TBbXEibGGr3UMXG5w4js XNLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NbtSapQg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 5si5701843plx.823.2017.09.04.12.59.22; Mon, 04 Sep 2017 12:59:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NbtSapQg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754155AbdIDT7T (ORCPT + 26 others); Mon, 4 Sep 2017 15:59:19 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:37075 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754037AbdIDT5u (ORCPT ); Mon, 4 Sep 2017 15:57:50 -0400 Received: by mail-wm0-f42.google.com with SMTP id u26so8559749wma.0 for ; Mon, 04 Sep 2017 12:57:49 -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=Sl8kFBccEl9fqk9O939IU3v3CW6Ryl8QJZmHbj4c6A8=; b=NbtSapQggLFDwCQ6AaVMALupM9N2C0rqfxE4vPLzhP7z+8pGJ0eKTYQUL+NFUbB4ok YEml5wo/Zi3jrgpCF/Z99uZ3KkrtrDJDnE4jXcmNvi0NWffyhiphpqRcetP+5EkBRUBD +uc/frz6YqseJ/svXOONgk5+dbyuaAs1hfTYY= 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=Sl8kFBccEl9fqk9O939IU3v3CW6Ryl8QJZmHbj4c6A8=; b=R1Y+rDRuEZvmOw7eV997ImAb2ym1w0TF+AdfmSfh/75KaZBZ0KLHGDBckZjuQ0rsui 36BxPYpOCFZh/SiC2U3MR09qjNjGuCBBqve2kwkjWwS6aK3KdiiEssbiblCdxhBEwmhy k0FC1sRCN/nZmyDrjRvEOki6+eOEaxA6Q21zy9iLNl9obou3bD1TL2xS0GV4/duWRc2u P1DH8OAx1Umzc8YrWtOASsUrinlX/sWnIWOqvbuxwZyOYE8QU30IAqXi28ndcjR6iJtU yfcUFjxr7t+tzYl85m+jsv5/ekYX/VN3f4yP+onA1Ei/HgzbJLQlTPop/DiblsXMyH6G gc/g== X-Gm-Message-State: AHPjjUi0EUKF6orkEzyvQvkE2an8t0CjmBRXSse0i13PkYUugoksxyxi Vw59/0ztR8r4RmoA X-Google-Smtp-Source: ADKCNb7PUtiD2q73aR02fzGri99WLT1W2ZGINFdXaUMpInT0EqcMMImCHP+Fb0NIYoeU95zDDkzMMw== X-Received: by 10.28.34.198 with SMTP id i189mr1282371wmi.165.1504555068443; Mon, 04 Sep 2017 12:57:48 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:f567:7c41:be9d:9286]) by smtp.gmail.com with ESMTPSA id 23sm10798976wrt.44.2017.09.04.12.57.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Sep 2017 12:57:46 -0700 (PDT) From: Daniel Lezcano To: rui.zhang@intel.com, edubezval@gmail.com Cc: daniel.lezcano@linaro.org, linux-pm@vger.kernel.org, kevin.wangtao@linaro.org, leo.yan@linaro.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 10/13] thermal/drivers/hisi: Rename and remove unused field Date: Mon, 4 Sep 2017 21:56:09 +0200 Message-Id: <1504554972-2624-10-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504554972-2624-1-git-send-email-daniel.lezcano@linaro.org> References: <1504554972-2624-1-git-send-email-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.7.4 diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c index 3ce9a4f..4c47b4d 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 const 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);