From patchwork Sat Jul 28 19:17:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10548047 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-2.web.codeaurora.org (Postfix) with ESMTP id 8E4AD13BB for ; Sat, 28 Jul 2018 19:18:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7BACF2AEFD for ; Sat, 28 Jul 2018 19:18:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6CF1B2AF0D; Sat, 28 Jul 2018 19:18:01 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham 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 0A3FB2AEFD for ; Sat, 28 Jul 2018 19:18:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729518AbeG1Up3 (ORCPT ); Sat, 28 Jul 2018 16:45:29 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:35358 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729227AbeG1Up2 (ORCPT ); Sat, 28 Jul 2018 16:45:28 -0400 Received: by mail-qk0-f196.google.com with SMTP id u21-v6so5455301qku.2 for ; Sat, 28 Jul 2018 12:17:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=OOH/PHxpRnGeuMfoZ2xAo6YgBLtWCNrlK4qgLhPbH8I=; b=aOEVj/83mLPYcDQC2sHqFn21SDq5dXqvrJt838dcTNSlVCfUu59synr3qfYNMuJKOI ZHVFk9EHd0urgTwehpK+lE26IXZUAkG0sjAADCtq07/6boqFEQoWb4YXnDuXGlT4vM7X HtoZkTWblpon1etxktUITGK8qLfAlwmQP+UWuq3qj7Vyf8d8dDiJDZBN524m3x8+Y9uY 3FTJ/syEF15GmYf9ogmhbw1hOaRnbr/+lbNkELQeiv2UCpRi+HHQ7Otj8NURNgtWkJ+Y G1w7nWpdnaYSJxQm6onvlHxjYTIei4tKwKQJk0yHp1sBDgQI2KFhsJub7MSXsX+DTShp qNgQ== 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; bh=OOH/PHxpRnGeuMfoZ2xAo6YgBLtWCNrlK4qgLhPbH8I=; b=Bcn1OcRmIHkylQc3rOtapeSUA70iyxDH9AsRW2O5rV3cRUdRTSK9B4F90kfhbcX1yJ HCE3vbSMIAJmSVBfHpPdrMV7nw4GLUIpOq0am42QrS1F8wwSwas601qDUcKIw15UEY1R EG16JaAcoWMF/c8Z945dqSrPwtMoI6uJzBGAEgN1xBFjAP+vNXWDVfW42b656kuN2KF1 435dBcUbN3meXCqcMtMd3wfxj8ldVQMyREiyO2pcCfQayZOTLC2ryYYDZ3kpBhD/oDuK D/Io+IvRfYTySpogcTPvdaCGHo6gtlCkRkvhfm1gNxzyD3yGmKtw/Zpth72Xt43R91Wc A3Qw== X-Gm-Message-State: AOUpUlGJ3oF4rSDZb5DY19/ky84QZEST4bpk6kGbhkTpQmJFMDq5GodW cDE1Blw7gCViLM0TU3NnTbk= X-Google-Smtp-Source: AAOMgpeJkgrE2EeMPDCkhL0UoUSycoEWZaStBWPW9MTw3qsESS8qwYsl10kdZPNk/5yido0H2iGUJg== X-Received: by 2002:a37:88c5:: with SMTP id k188-v6mr10921499qkd.365.1532805479066; Sat, 28 Jul 2018 12:17:59 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:8e7:a54a:e2e9:45c5:46ad]) by smtp.gmail.com with ESMTPSA id a187-v6sm5214538qkd.47.2018.07.28.12.17.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 28 Jul 2018 12:17:58 -0700 (PDT) From: Fabio Estevam To: rui.zhang@intel.com Cc: edubezval@gmail.com, linux-pm@vger.kernel.org, hongtao.jia@nxp.com, Fabio Estevam Subject: [PATCH 1/3] thermal: qoriq: Use devm_thermal_zone_of_sensor_register() Date: Sat, 28 Jul 2018 16:17:49 -0300 Message-Id: <1532805471-19593-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 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 From: Fabio Estevam By using the managed devm_thermal_zone_of_sensor_register() we can drop the explicit call to thermal_zone_of_sensor_unregister() in the qoriq_tmu_remove() function, which simplifies the code a bit. So switch to devm_thermal_zone_of_sensor_register(). Signed-off-by: Fabio Estevam Reviewed-by: Daniel Lezcano --- drivers/thermal/qoriq_thermal.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c index c866cc1..e32d6ac 100644 --- a/drivers/thermal/qoriq_thermal.c +++ b/drivers/thermal/qoriq_thermal.c @@ -233,8 +233,9 @@ static int qoriq_tmu_probe(struct platform_device *pdev) if (ret < 0) goto err_tmu; - data->tz = thermal_zone_of_sensor_register(&pdev->dev, data->sensor_id, - data, &tmu_tz_ops); + data->tz = devm_thermal_zone_of_sensor_register(&pdev->dev, + data->sensor_id, + data, &tmu_tz_ops); if (IS_ERR(data->tz)) { ret = PTR_ERR(data->tz); dev_err(&pdev->dev, @@ -261,8 +262,6 @@ static int qoriq_tmu_remove(struct platform_device *pdev) { struct qoriq_tmu_data *data = platform_get_drvdata(pdev); - thermal_zone_of_sensor_unregister(&pdev->dev, data->tz); - /* Disable monitoring */ tmu_write(data, TMR_DISABLE, &data->regs->tmr); From patchwork Sat Jul 28 19:17:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10548049 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-2.web.codeaurora.org (Postfix) with ESMTP id 9580A139A for ; Sat, 28 Jul 2018 19:18:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FECD2AEFD for ; Sat, 28 Jul 2018 19:18:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 721972AF0D; Sat, 28 Jul 2018 19:18:03 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham 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 167AF2AEFD for ; Sat, 28 Jul 2018 19:18:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730364AbeG1Upb (ORCPT ); Sat, 28 Jul 2018 16:45:31 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:42495 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729227AbeG1Upb (ORCPT ); Sat, 28 Jul 2018 16:45:31 -0400 Received: by mail-qk0-f195.google.com with SMTP id 26-v6so5436140qks.9 for ; Sat, 28 Jul 2018 12:18:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DvUBpBIHsx4vWzoH/CV2waHdx54WL0RH2XDQSk4SU2M=; b=uQWZOeMHH6/naLohD//T5aQ9p6ttF0/YNZTuiBunBJGM1COK53k9pSa++EurhaBMSO fgzu9StxV+nDXubfipUXROIHiyOzAr+wX0x3EZPIqPWKB705ZFleC2eV2+PbWtouz5Yy L3+ZQAbN66j062ui+IiRAwYyWYSQdaphaizQe8oK2G8eUOXKB2AVVVrO1XvNLYR5yZEi +hH9xb+cD2c/hHp94Qgh3f+/lssJsJp/KCgM1UDlFRcntUte+joMZvDfaVz3J3qA7YzP oJlXAjhqTAQ3F2tCa4dinp3gGxTCNz+khk0TNOW8IBoTW5dzRE94JMMRgOXZl3xYxAC5 z3Uw== 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=DvUBpBIHsx4vWzoH/CV2waHdx54WL0RH2XDQSk4SU2M=; b=rnpSCEou0JOwcJLrN2GjobrekqNMjg3KnJxbkW8Jt+itg1av4P6EdjdVuU2ErtViMy 2Z3b75H6HQJUZyNS3d1I66aZQcb9ioJfI+dCaxRNx6A+QxnN9K7DZJANUonVcuJn/D3R d750h32shSoJ4Do/sYhnuxqzOwOlaDfvLhTavVAH60CzwRqUpbtRtdhKgRosSVYvIvrJ rB+z0FeOiQ0TVS2mX5itV3k4+K8PkzjH2KkUq498mG0BRntQsvz84J04JM50Az4q8mSO NP4xoPMbeTJ5WNKOxSWbA1FjEq5IZk7H8TsRLdOzBPc7e4pD5H/79tE5J6XJbLcGczFZ uPhw== X-Gm-Message-State: AOUpUlEdkiSCBku46eIOMMS/qEW9ufRRsS1PYtI6rNr3o6k4rGbYlH/6 CSZg6d54HOb5a4rWYAoOKZQ= X-Google-Smtp-Source: AAOMgpefTuusTyLMGo3hDAZSdBnFmUVI6R1pP/tYsrY+P1V+t00pyHjXV3vo7doqduU2Lt/VeUUNhA== X-Received: by 2002:a37:8346:: with SMTP id f67-v6mr10147807qkd.18.1532805481169; Sat, 28 Jul 2018 12:18:01 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:8e7:a54a:e2e9:45c5:46ad]) by smtp.gmail.com with ESMTPSA id a187-v6sm5214538qkd.47.2018.07.28.12.17.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 28 Jul 2018 12:18:00 -0700 (PDT) From: Fabio Estevam To: rui.zhang@intel.com Cc: edubezval@gmail.com, linux-pm@vger.kernel.org, hongtao.jia@nxp.com, Fabio Estevam Subject: [PATCH 2/3] thermal: qoriq: Simplify the 'site' variable assignment Date: Sat, 28 Jul 2018 16:17:50 -0300 Message-Id: <1532805471-19593-2-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532805471-19593-1-git-send-email-festevam@gmail.com> References: <1532805471-19593-1-git-send-email-festevam@gmail.com> 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 From: Fabio Estevam There is no need to assign zero to the variable 'site' and then perform a compound bitwise OR operation afterwards. Make it simpler by assigning the final 'site' value directly. Signed-off-by: Fabio Estevam Reviewed-by: Daniel Lezcano --- drivers/thermal/qoriq_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c index e32d6ac..f807e4d 100644 --- a/drivers/thermal/qoriq_thermal.c +++ b/drivers/thermal/qoriq_thermal.c @@ -197,7 +197,7 @@ static int qoriq_tmu_probe(struct platform_device *pdev) int ret; struct qoriq_tmu_data *data; struct device_node *np = pdev->dev.of_node; - u32 site = 0; + u32 site; if (!np) { dev_err(&pdev->dev, "Device OF-Node is NULL"); @@ -244,7 +244,7 @@ static int qoriq_tmu_probe(struct platform_device *pdev) } /* Enable monitoring */ - site |= 0x1 << (15 - data->sensor_id); + site = 0x1 << (15 - data->sensor_id); tmu_write(data, site | TMR_ME | TMR_ALPF, &data->regs->tmr); return 0; From patchwork Sat Jul 28 19:17:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10548051 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-2.web.codeaurora.org (Postfix) with ESMTP id 79B18139A for ; Sat, 28 Jul 2018 19:18:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68FBA2AEFD for ; Sat, 28 Jul 2018 19:18:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 569472AF4A; Sat, 28 Jul 2018 19:18:05 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham 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 DE3502AF0D for ; Sat, 28 Jul 2018 19:18:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730368AbeG1Upd (ORCPT ); Sat, 28 Jul 2018 16:45:33 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:39463 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729227AbeG1Upd (ORCPT ); Sat, 28 Jul 2018 16:45:33 -0400 Received: by mail-qk0-f193.google.com with SMTP id b5-v6so5443758qkg.6 for ; Sat, 28 Jul 2018 12:18:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MZL4HejQqgpjpCfK/nVcbiMfrg05EpIa5Jh0pdakV18=; b=WzvdbCaOYvmRROja3oEvdnnlwbLfRmUGOGmZvT8yPsMU94N5zgLh7yPEqRP83sTdq2 vs31LApufxoujNjc8xjZuuo/HEcBYtnyvZqKwG8/zgddZEsb+dNo4BCoqjGqZuaO0YLz pXw+4W6uxUfAGTNcZCprPvpGionAVQa+TijZdooX++MfjuMs9S1J0+Qi0s7kL1l5OH/Q CYL2utUdrqZfC4GY3EPXfiNUVCH1mhmFDFlnWdncLsw0WZfX6wvBOsz2pStH6H+mAesL WDOanTOoLwWHRWI4kPsAUCLM6yaPBwAjNTFfNoLYffKmLjx40U6aHSQLe72x8lq1xRcM GqSQ== 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=MZL4HejQqgpjpCfK/nVcbiMfrg05EpIa5Jh0pdakV18=; b=tb9UFoNJ5OdB2phr4cooi1n2tqEokWgDbRI//e5/xTUMz+xEk4OUBAAsMyqMaRB7+a lYiQtlVSxqkBqfweLFAT04XrC1gLiVwumkwUI9xkGtxhmUyznM05/v69xwiOCmXAPJVl zsDMs+OLeigZRNDR7YGhFak+NvbE4AjUYOJfw0WVYl26OITc9xwgJSVvDa3N24iSpG5V n0i7RCaiatFbScwaidFCpwHJ3+JkYU6rwnAiQXv/wJ44G+QqfJSqOb7kMmy+rujDyRDw HxcRPJEEVxRcUoZW5gq+ZLuLTRPuML3eszHcFMz25VvbNHZ9PVoj8/EtnQYrFO6QZjh3 26vA== X-Gm-Message-State: AOUpUlHYjizoDvof2Da4a9nDAaXSrrkSZaplp4PxWrXin+InYc8ZGy+E dJM5n66s9SRAbJBAUdw2/ln6rMwuRv4= X-Google-Smtp-Source: AAOMgpeRvtQfbGpddx8/YMMzEYR+UeslYLG4qRbj0kEVogD/HRzsb889TS/tJVLl7c+e1ff2aYRoZA== X-Received: by 2002:a37:234c:: with SMTP id j73-v6mr10869947qkj.146.1532805483252; Sat, 28 Jul 2018 12:18:03 -0700 (PDT) Received: from localhost.localdomain ([2804:14c:482:8e7:a54a:e2e9:45c5:46ad]) by smtp.gmail.com with ESMTPSA id a187-v6sm5214538qkd.47.2018.07.28.12.18.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 28 Jul 2018 12:18:02 -0700 (PDT) From: Fabio Estevam To: rui.zhang@intel.com Cc: edubezval@gmail.com, linux-pm@vger.kernel.org, hongtao.jia@nxp.com, Fabio Estevam Subject: [PATCH 3/3] thermal: qoriq: Switch to SPDX identifier Date: Sat, 28 Jul 2018 16:17:51 -0300 Message-Id: <1532805471-19593-3-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1532805471-19593-1-git-send-email-festevam@gmail.com> References: <1532805471-19593-1-git-send-email-festevam@gmail.com> 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 From: Fabio Estevam Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Fabio Estevam Reviewed-by: Daniel Lezcano Acked-by: Philippe Ombredanne --- drivers/thermal/qoriq_thermal.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c index f807e4d..450ed66 100644 --- a/drivers/thermal/qoriq_thermal.c +++ b/drivers/thermal/qoriq_thermal.c @@ -1,16 +1,6 @@ -/* - * Copyright 2016 Freescale Semiconductor, Inc. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms and conditions of the GNU General Public License, - * version 2, as published by the Free Software Foundation. - * - * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - */ +// SPDX-License-Identifier: GPL-2.0 +// +// Copyright 2016 Freescale Semiconductor, Inc. #include #include