Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp368134yba; Wed, 24 Apr 2019 02:39:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgm7AbA7cEaVerBB4uwVs9xzrZFAxg3NlqexX93Fpu+Ykz8/AewFt8XIjfehCi0TWLhtk3 X-Received: by 2002:a65:65c9:: with SMTP id y9mr29703119pgv.47.1556098792919; Wed, 24 Apr 2019 02:39:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556098792; cv=none; d=google.com; s=arc-20160816; b=RlfxX+ZIyc+aTkt7IXM2luBey4rGdz38lGDM0SUQEeweA8dU9R7NVcL8+9cbX+MPOS dCCwt8j9YI2bMcGa7IZRM1b3EKDNyMSFeYZdfcz9F12lIL+anPBbzkX1z4YWuskkCjbj WBKpmkSPmNmdxykIntsXf97+m6TP0KbjbD8XCWTllQjq8X4YkX7iN6QaqVWfDx/J2EIH YlH7hia2qhKoTiC/L0Z+HejRR6oQVubJTP9gGUOuAN6DQ11hz9TnU/otDhM3drnXmIAa SdH6Kvn17YRLU+yReXUDd7xkPYMfcLzcOxj7Q45TqRI5Six7jygtuEknjAapSJVADGGO t5Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=KIYWXBy0yVdZQntxiMbH9CRQ0LmxGO1cYhntj34UfNc=; b=C3sCWmlVKRplTWvgGdd0QhRJCOmqn0hiEYwSic68YSAZm0LYDSsNFsyTM7gz9ccyCb 7fu2767qkKF04F14vHSjr2wnVT7uweLofPlvbQl7+4cJnXdssjc7xpUzmd2RUAh1veYC WkQ8zX1e5PnI+iQh4prT+HFJ7DrltJfTzSjsFsTZwK2PoF8nGz3QpA79nE2+VpUMa2Yt Gmj8RuLCWnEjSb8iNXQnwbFZksalvTdHESBJsKA5h3xmQrvTQLhPRaZU4nHMgaRJIBR5 yYMm7egb1R8rJvPC+YQeABW8hiBKntJF9bHmC0CHkvVQFxQMd1NfTliGlvu+QSH+SX3n vWQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fZD7VYFt; 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 f3si18949278pfc.92.2019.04.24.02.39.37; Wed, 24 Apr 2019 02:39:52 -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=fZD7VYFt; 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 S1727981AbfDXJiL (ORCPT + 99 others); Wed, 24 Apr 2019 05:38:11 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:41400 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726262AbfDXJiK (ORCPT ); Wed, 24 Apr 2019 05:38:10 -0400 Received: by mail-wr1-f67.google.com with SMTP id c12so17998213wrt.8 for ; Wed, 24 Apr 2019 02:38:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=KIYWXBy0yVdZQntxiMbH9CRQ0LmxGO1cYhntj34UfNc=; b=fZD7VYFtUre34XHlMUrfXxQgJvQgeXJxUsS2UIrnEFOOJSUQqr3x13upCLFu9nUvbu P+vvzlbVrleng80oUiMu4GlzlXNH6EP7CvMtRckA+LRpN+GF7sdK2ilsfAm/4Lf3pzds su15hNylpbtXU1/MGAhLOZubWXY3UTIPRs0XPaI9yLiUGJ0/GXPwjnuWYZfOjyMaRIBj MZmqyfY+gccgSErsIBdOYD2Z5BT2oVWt/bP1b6Btc+FZLawf30/khy2fg2Wj16D4A6gu wal1Z54UixsE4kU1gk+nym857FItg5jO4Zzx5vyUpMW2rNoDEQnOwbE+vPyldtkBq7yL YaOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=KIYWXBy0yVdZQntxiMbH9CRQ0LmxGO1cYhntj34UfNc=; b=MMZK3XwJ1N3EdKsH7Zj/g+bxxJyL6gJstjXpMW7sp8Qqh+a6Tfa1P7qA9cs4AxgQfK o/QxscMPRVA4ZFCExA3vTlM3cAzU3Bu1dWLd/gY6VCc3kF7AMzHICocD9TbYUYxe0/Hz aEUU7ipAf9ZUffG32nwPaUqiDKDPgk23RHslgIGgPegZCKQddeiEbGAk+VqchOuoT4G7 BmGZ2erEFlqGqBjhf5eF/FXQMH0kVdFp78sBVYQ9qI93f1jPZwnIE94RsvnZRZG+O5iG C6sebwTjSF2G8aInqsaAbLZ+6QFn02v1LmcHADljibzmjlZ69F2aCE/cPuUBwRN6VZOn agDg== X-Gm-Message-State: APjAAAXtcio2MIQeI69cwk0s1IzHsz2M1Onx5Gn1E/45bBaJiHvSKFZr GG5Tl9FZZg/DMP0/mAbHv30aqpNCbi8= X-Received: by 2002:adf:eb0b:: with SMTP id s11mr22259252wrn.140.1556098689066; Wed, 24 Apr 2019 02:38:09 -0700 (PDT) Received: from [192.168.0.44] (sju31-1-78-210-255-2.fbx.proxad.net. [78.210.255.2]) by smtp.googlemail.com with ESMTPSA id q3sm1133033wrj.24.2019.04.24.02.38.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Apr 2019 02:38:08 -0700 (PDT) Subject: Re: [PATCH v4 2/2] thermal: rcar_gen3_thermal: disable interrupt in .remove To: Jiada Wang , rui.zhang@intel.com, edubezval@gmail.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, horms+renesas@verge.net.au, niklas.soderlund+renesas@ragnatech.se, geert+renesas@glider.be, sergei.shtylyov@cogentembedded.com, marek.vasut+renesas@gmail.com, kuninori.morimoto.gx@renesas.com, hien.dang.eb@renesas.com, fabrizio.castro@bp.renesas.com, dien.pham.ry@renesas.com, biju.das@bp.renesas.com, erosca@de.adit-jv.com, george_davis@mentor.com, joshua_frkuska@mentor.com References: <20190424051145.23072-1-jiada_wang@mentor.com> <20190424051145.23072-3-jiada_wang@mentor.com> From: Daniel Lezcano Message-ID: <8d80c874-956f-b2e2-412b-69cc26235606@linaro.org> Date: Wed, 24 Apr 2019 11:38:07 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190424051145.23072-3-jiada_wang@mentor.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/04/2019 07:11, Jiada Wang wrote: > Currently IRQ remains enabled after .remove, later if device is probed, > IRQ is requested before .thermal_init, this may cause IRQ function be > called before device is initialized. > > this patch disables interrupt in .remove, to ensure irq function > only be called after device is fully initialized. > > Signed-off-by: Jiada Wang Reviewed-by: Daniel Lezcano > --- > drivers/thermal/rcar_gen3_thermal.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c > index 065e16f53285..280230951dfe 100644 > --- a/drivers/thermal/rcar_gen3_thermal.c > +++ b/drivers/thermal/rcar_gen3_thermal.c > @@ -307,6 +307,9 @@ MODULE_DEVICE_TABLE(of, rcar_gen3_thermal_dt_ids); > static int rcar_gen3_thermal_remove(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > + struct rcar_gen3_thermal_priv *priv = dev_get_drvdata(dev); > + > + rcar_thermal_irq_set(priv, false); > > pm_runtime_put(dev); > pm_runtime_disable(dev); > -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog