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: 115425 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp4039063qgn; Tue, 10 Oct 2017 11:05:10 -0700 (PDT) X-Received: by 10.84.232.203 with SMTP id x11mr12844944plm.396.1507658710414; Tue, 10 Oct 2017 11:05:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507658710; cv=none; d=google.com; s=arc-20160816; b=JJPJUogJJW8El7IWq3ZiSc10YE7tmx+/rw6JSGRcqH9ATG8E9vOz0esbjmdC6FbqCv QDmv98oiRHOqAyAfLRdWxC5v/J8hxNXokbCtJe8QM/uCId7Tx7IgL+2oBkReThhHwotb TpN3vb3SLOyZ9alO+ZJPvajA4hYDHPm8PmEwUdLrdlvcFvNk2Gj3rX9OMQAL1/lVSweE Xs+J7DEXFBqvJc2J9WGuR8MJTI2uI5OX+ox2LASeQmElrz+t/pfJdxATMovgAWGiaKVE OOGpNWef0+8mPpqLhFVrOMMi+NiO+AkjKkhjSssm2ZeW6m8ghh0kb38IxIhemsfj+Imc nyTQ== 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=1G2xHEuBbX6i9kBTr3QpkoabQbUUI5A3+20IBgzvXZ0=; b=KUm8me9KRV4wmgUsplv/TiETem8fxEFC+H8LjejsAeZ7lBMF44yacHc+3jSHUqygcv aURFck54VXgCsZBx1S5vijYkOAhKHVU+/N2IbkPqakH525ZnHrkEO6cu/rcBYDIKC0hz qOWwfng1vnhfqrXJW+YtNj7MdKHzZyuMbfAqgVH2A4P6YdXSKob9J2gJ96H8fsF8CpTz kkNu5zqQSNBpdKGme1mvzLhWify5UASRTX2bW3yeOW6CdAATsE+v1cwBV4yn8PMAI2/n tBOAk407c7mggzO+tAAHz4LuMHueIbjivL/mz4w+a4+/5hu5jJvGgiod5DjxJEjrGU5K XULw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i39jn3YU; 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 s4si8828206plp.584.2017.10.10.11.05.10; Tue, 10 Oct 2017 11:05:10 -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=i39jn3YU; 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 S932590AbdJJSFH (ORCPT + 26 others); Tue, 10 Oct 2017 14:05:07 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:46363 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932569AbdJJSFE (ORCPT ); Tue, 10 Oct 2017 14:05:04 -0400 Received: by mail-wm0-f51.google.com with SMTP id m72so7518483wmc.1 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=EsgWiRMqtrn9m/tgS+dj71/NPVpnZSQOfwWuCz7bNLgos+mIrEq5KRPwgHA+X0zNiR rYDRPL0zwipR69K3g2dnLI/u7WR23HP+O8o9mJz7I9vN3BcxfN712bfoCYNWusAklzCv tnjQgQnuKIQ/0cLvFYy3pvSA4no4Q3Z9vCEB/BHki4v3aVcBc7tALI6iGGJMkYXQxTmM eiUiMTlTKcbZQgDVs2ZN3jj7ZrOzQu8+hjAKmKDm7oqrd4d7lWBAR2kMcl7CY4EtuYFP 4qjMTXYMeManYIJxRBgjkkqRCFtrxVNqrgP0Tsfw8dvwTaJONNKCesSmX4cEDtdEMTC2 +QKQ== X-Gm-Message-State: AMCzsaXszfGn1+7t/ZLmWvQLPIBp+tJfITXjC4ZBHt7f1kxGsn1ULKQw NdvYvfBE6vDyuiq6GZaNXyGNpTpWV+U= 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-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 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);