From patchwork Thu Oct 19 17:05:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 116427 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp724484qgn; Thu, 19 Oct 2017 10:11:26 -0700 (PDT) X-Received: by 10.84.192.37 with SMTP id b34mr1975689pld.221.1508433086540; Thu, 19 Oct 2017 10:11:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508433086; cv=none; d=google.com; s=arc-20160816; b=P71gPDrWQtW8Ln76ExkQOwTvhcgAZKMFh8AYKY0tU8W9CeK07OaQCOKIYibdTFP5Tg DQK8xo4wjaAzXaTm4FkRrh8+/PW5/DFaOKhtqMiF9jYBQbNaJk60Jx7ZHXfvc+wP2vo1 Iw2hyAFWvZHaOU+hcEuMr93YG1tS0xjvVasPBi2HZg3wSMyr2Rv9AN7FAHAEHQQ1/7uk QE0rXV0Lj7GlG2YdqFqkzojPiGbY19eOPkicjTD2KjCxd/oK0zq2cvOQRpTJU9lWSk9M YSgWruMbi72WH7Ob0t9wNWNVPX48jOza37tma3kQk9/lsRYyGA2653U4fSn6QphYQYYv FvgA== 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=+KujdbHN3qEot2SvxbKORv1M+FH5gPRfR4hO8EKJ3aw=; b=o7MYVmfKR1R8or1Maynq87aXYwT+IcQkyKDC81k7PXm4hJvL7WyvWpNG+5zmya10NK dUvbP4DIc5Qpqp/ZiAqBzeGKeU+aQwcxrBS2zLjindozdKg3HUMeL2t+aDF/SvD0JIbg KKbWZglFt3WUvtw8zPGiJQlvjHAZ2hBCA/lPlYTdB81OqbUe0h0D/rZcMqeBeAYKpsH+ ioZvsTvS4swMTCdJS9GkNrJKycaPku2wCT9smH0TG7CJoOqLYnnU4Ei3yqc8KBUEISx+ 5L0cYeHnf3LI6HkhpuW/oZto/ousoy9yDOIVHk4FbHh9C6GfCzpbkv1CvPn4KGjUVe5S hyhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HoOaGKWu; 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 v30si8997866pgn.569.2017.10.19.10.11.26; Thu, 19 Oct 2017 10:11:26 -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=HoOaGKWu; 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 S1755078AbdJSRIq (ORCPT + 12 others); Thu, 19 Oct 2017 13:08:46 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:44597 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755070AbdJSRIp (ORCPT ); Thu, 19 Oct 2017 13:08:45 -0400 Received: by mail-wr0-f196.google.com with SMTP id z55so2981941wrz.1 for ; Thu, 19 Oct 2017 10:08:44 -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=+KujdbHN3qEot2SvxbKORv1M+FH5gPRfR4hO8EKJ3aw=; b=HoOaGKWuPKzL9HM184hKMZB9Ei7Z+SO13XBU0JUMXlMXiRgTJF/cjGvxwthNp1q1ZX +jti7x0LjO4IRkr699iU41ranDoWTvkvAUVeeKd42fEphN7+6lI6uihxpcPVV6Riaoxw hKkfUD9es4Wy9oZKHBErOWeKKjY4VnmbwhXYI= 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=+KujdbHN3qEot2SvxbKORv1M+FH5gPRfR4hO8EKJ3aw=; b=sPfQYhAWMW3JhjHV2OpPgGukJeu3gMqaggeIbDK5J12Ou8ujkilEN7XKXv24GaZga6 r0HGkHTD2tHoSkBmg5owKpiTTvSif66j5Ej9tbpmV9fx07G4jQPeOzXH4XqBZW9ypI97 +hBaM/koGPJjfd2AJr1nDDIW35SyuESgPP+09mmCBe58TdEllP+1M5c11kZ46XPx5sns wNCM9p2z7/loJl+xWXunwsyqAsdHLdEXJ/yPGWP5InktyKO2Gl6lXJJ75rMPDGBt2gPb PgYm9GpF1iWTiAM1/T0AnRqKLROg56oagX0nPd7kN24j6+xvHTcHbwAwphl4rclQUtDl 5mbw== X-Gm-Message-State: AMCzsaWJ2qtHnv+O/2feF7Vr9U789zznX4MyJRaQK2UsKwJWcE3hEqx8 adgk8o3PgALakatggNrnL4jm7Q== X-Google-Smtp-Source: ABhQp+TAX76NEeRPCvNBkAvp3GjXzjQ3/jZR11eh+HyY6KQUNMQQ5DQ5kgiUYukSlB087dl7DQ3xHg== X-Received: by 10.223.136.246 with SMTP id g51mr2107177wrg.226.1508432923762; Thu, 19 Oct 2017 10:08:43 -0700 (PDT) Received: from localhost.localdomain ([2a01:e35:879a:6cd0:51c7:d9b7:e14b:6840]) by smtp.gmail.com with ESMTPSA id g16sm14277394wrd.72.2017.10.19.10.08.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Oct 2017 10:08:43 -0700 (PDT) From: Daniel Lezcano To: edubezval@gmail.com, rui.zhang@intel.com Cc: linux-pm@vger.kernel.org, leo.yan@linaro.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/18] thermal/drivers/hisi: Rename and remove unused field Date: Thu, 19 Oct 2017 19:05:52 +0200 Message-Id: <1508432760-17847-10-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508432760-17847-1-git-send-email-daniel.lezcano@linaro.org> References: <6ac48f08-7fe6-92e9-0801-6ed3bcd05ff1@linaro.org> <1508432760-17847-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 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 c7bdcfe..baa3853 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);