Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp173719yba; Tue, 23 Apr 2019 22:14:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXjaZjS22m6HnDnKow3VLYtfQjii6YMtWf2nTBrJEaaKh/XJ98czEijd4Rm+PuW+Pk0InG X-Received: by 2002:aa7:8581:: with SMTP id w1mr30637400pfn.249.1556082850791; Tue, 23 Apr 2019 22:14:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556082850; cv=none; d=google.com; s=arc-20160816; b=ppibFZ4RNxqINxy82bdCwwMDiC3ryNwmJ01+QVpTubBuXiZC5YFSdJKs7rlb4JC37g Tv7tLK7jniryhVlHFRO25okKQJgO9WsBvSQJPulNZCOy7fG3U0Q9ALiBjccU0WN5+10t ZJP+DF76UNY9a2AUn3hYYUIojMcSaDT89i/V1xjvx6mHziwggyjdiQmQF8F9NMQVskcs vNJd5+v+mwFlBRxfvQwhw1hC2SghEOw64X4cKO4aFfNflMo8XIuZj+WQgOMoR+1BnC9I 93BRJjjVy484IRcXI/L5GMnM+d8hxCe7+DsYKuPvtzP+KhonHnN/VvqGLXkFNKcPlk1P K8yA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=yC77nTR88bkDOG39IBrmVkD4Rq21r1nGGYGg69V0D8E=; b=F3lvN0zmmfOsFVePkMHv7vW1o/QjrZS/HIe9E6N2w3t5yBNYPt6cyU+O+VPcYLUXNf Y3htCzng1mpkEkba05bKV+8LqGPG0wBj+KbVpUIKx05VjP4zkFDhE/XY724S0xUzPjj9 7bGqCZQCkpNg/yLLb+dbDgsk1DmXFURMxvp2EGEBeXsl0cyJJ3pOBAzBe/6qLj97TRTp qvKqEtMC/c4Q76URBQXstCp9gsvyQSa5/thEhN4RegIkQrDbdMgX1As+p5RWi3ENOuG+ Op8W2Ym9t0h1kXgYVLaYruC1BfC2tLqVw/UyCbvxJxgVH6ZuqEl6UmaBv9Bi8hMeAQNn Q9Lw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s4si18412467plq.133.2019.04.23.22.13.56; Tue, 23 Apr 2019 22:14: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729353AbfDXFNC (ORCPT + 99 others); Wed, 24 Apr 2019 01:13:02 -0400 Received: from relay1.mentorg.com ([192.94.38.131]:44937 "EHLO relay1.mentorg.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726151AbfDXFNB (ORCPT ); Wed, 24 Apr 2019 01:13:01 -0400 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1hJADL-00028r-4Z from Jiada_Wang@mentor.com ; Tue, 23 Apr 2019 22:12:59 -0700 Received: from jiwang-OptiPlex-980.tokyo.mentorg.com (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Tue, 23 Apr 2019 22:12:54 -0700 From: Jiada Wang To: , , CC: , , , , , , , , , , , , , , , Subject: [PATCH v4 2/2] thermal: rcar_gen3_thermal: disable interrupt in .remove Date: Wed, 24 Apr 2019 14:11:45 +0900 Message-ID: <20190424051145.23072-3-jiada_wang@mentor.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190424051145.23072-1-jiada_wang@mentor.com> References: <20190424051145.23072-1-jiada_wang@mentor.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ClientProxiedBy: SVR-ORW-MBX-05.mgc.mentorg.com (147.34.90.205) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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); -- 2.19.2