From patchwork Wed Aug 30 08:47:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 111285 Delivered-To: patch@linaro.org Received: by 10.140.95.112 with SMTP id h103csp595273qge; Wed, 30 Aug 2017 01:49:07 -0700 (PDT) X-Google-Smtp-Source: ADKCNb5+Gj78PMt/jtt/4s5IF9lUX8abzVgKzZMyJkHVfZmmzr2HTrmVBk43jWWYOHqgWTBpnuMn X-Received: by 10.84.224.72 with SMTP id a8mr1051743plt.92.1504082947697; Wed, 30 Aug 2017 01:49:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504082947; cv=none; d=google.com; s=arc-20160816; b=IgIJZ04h10c8FKZ6lb6JYzn22mA2YFMwHgXpGVl52qKMCZcltHCTV/i/Dk1Uvzf8C0 4IkSUI3nAygnSgKn+nL6RK6qh8FLIwNfxqhC5qF9l7OiZiUEXOHEc767btwYxfvuIpBk oFaZfNvkRTZP8HeJGWlbvYywYz2wzJ9vjfnaTdda97ittLbrU9ZmOUMbs4xn05l+XZ9j mS1IlFiLyR+u9UGaVvi6uzQqz/gtvFCwG1XBRG1Ry/9DzeO2I4HLuv5WUiHURfblEYyz qUND/4LlmCfeZ2d2kzcK4U2NyCCzZc/e1s6eYuevWlqpkH5oQW1AcS8DDhcmTgzAJLSD K8uw== 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=L59o5KhOAnbWNvbrzjq5OFkzNtbbH5svlrsIshlHsPU=; b=gnOclNuDFcXsuz8WX8Q+KQ/fOz9ZFL4C/Bte5cL9Dn+OzjPDUN9hIgJJoUu9uGRb3k OJk+iXu9uBHhusIidCtG+BSzt7GOKHtCNOSvFfqxTqkQrs63bfHRSe6N1+qgTlyP3AGl t8Z9pLTj+Brs4zzaSbXZbE0tsxI+nMQimOwJJQDoWCvsyiUFpo7pwkchWp/2R5/ramMX 1EBqiJOuEujXmMBXYL22xyuSN48krQRwo6BFkah948D+LOqwqXXbNJhRW7hMF3gwnRgT fcC+FPcTtWUOnegdIbnkBzGWHB2fxzdXbGasWxRiDp7g7KLBpjYeRYtWlM5+WPqGLAli FI0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BN02T81J; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 h185si3913779pfb.398.2017.08.30.01.49.07; Wed, 30 Aug 2017 01:49:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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=BN02T81J; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1751693AbdH3ItD (ORCPT + 12 others); Wed, 30 Aug 2017 04:49:03 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:35095 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751622AbdH3ItA (ORCPT ); Wed, 30 Aug 2017 04:49:00 -0400 Received: by mail-wm0-f54.google.com with SMTP id a80so5554232wma.0 for ; Wed, 30 Aug 2017 01:48:59 -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=L59o5KhOAnbWNvbrzjq5OFkzNtbbH5svlrsIshlHsPU=; b=BN02T81JriQTOnrgmFQMmK6q2ut1iHyZtRPEDKV2d4iLP6TgYXbUl83FOqFEFePSIY 1prjllez6yAtklzDNYSFqYy6NeozqY68swZL7DrejjlbmkiUDIjZqqJkJw7ttuMArATj iwZH72Ns7k30/gyWbL3vdxYeq2n2gIgS9WlbQ= 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=L59o5KhOAnbWNvbrzjq5OFkzNtbbH5svlrsIshlHsPU=; b=IbxeO68K/dYpcLzHt7+r0/k7EqbezpRnITWdc8GV2MzQlCNXTuhURbxiLnrXDjHuek wbxfRysFokGD9la60rL8jD1pOmRjpVNcvMGbvnGpHQ/jEpja2vwx/64uwN8Q99O9mE30 pLbymzO/OawzRNt0gakNg+5WR7gkJSoyeUwWCtqHRv5D2eSJWrAKP7viUWWOtAPoAVdd FkzNNhjCazwXKA29ic2Ce9Vb5CJzjLqbNxqMgRESnSkppP/+RXHoXTxYrOh+upaRBEus 39hzqt4klT2HGEYbetVbvgfkVKjT6v3nsxIugLEGCeSBwnd/VoJo6cCQMzVovqv0jTnR kPYg== X-Gm-Message-State: AHYfb5hROr+KyMu/SDFqYd5glAfTWRYKtDCvrF5I1YLqztM5hnRlrfR4 ezNi/FgvYMmfKpbk X-Received: by 10.28.143.5 with SMTP id r5mr721424wmd.77.1504082938922; Wed, 30 Aug 2017 01:48:58 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:b0b0:ba2b:b9fd:8a33]) by smtp.gmail.com with ESMTPSA id q24sm4032811wrc.26.2017.08.30.01.48.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 30 Aug 2017 01:48:58 -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 (open list) Subject: [PATCH 10/13] thermal/drivers/hisi: Rename and remove unused field Date: Wed, 30 Aug 2017 10:47:34 +0200 Message-Id: <1504082857-21702-10-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504082857-21702-1-git-send-email-daniel.lezcano@linaro.org> References: <1504082857-21702-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 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 --- drivers/thermal/hisi_thermal.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) -- 2.7.4 Reviewed-by: Leo Yan Tested-by: Leo Yan diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c index b038d8a..68b625c 100644 --- a/drivers/thermal/hisi_thermal.c +++ b/drivers/thermal/hisi_thermal.c @@ -47,8 +47,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; }; @@ -57,9 +55,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; }; /* @@ -229,7 +227,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); @@ -240,7 +238,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) { @@ -303,7 +301,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); @@ -376,7 +374,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", @@ -398,7 +396,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; } @@ -406,7 +404,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);