From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADFD7C46460 for ; Sat, 1 Jun 2019 13:36:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7DBBE275A6 for ; Sat, 1 Jun 2019 13:36:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559396200; bh=AytSI2WkOrll9PWGX8a8/S3/JT/BNNxoiq7r583HETo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Aln4wXbE1zRwiilQRzT2bBvTNZPuabJbVsyDLCZjevPTAMOhXLFotqZijwUxC8b2K /ykbLKF1CgZ46iJRvGuWS7JBRP6tiEUFe56cLCIlDkPwkHCGMSi5grJUTVKfPU5175 43eAqByJLiB7mDUFXPeHuLOgFUv7T/dhCsm6kNxE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728794AbfFANWo (ORCPT ); Sat, 1 Jun 2019 09:22:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:52380 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728788AbfFANWn (ORCPT ); Sat, 1 Jun 2019 09:22:43 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 641E624C2E; Sat, 1 Jun 2019 13:22:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559395363; bh=AytSI2WkOrll9PWGX8a8/S3/JT/BNNxoiq7r583HETo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ShDk6G4SfIYNbPq3oXXVP98IKxaIkgkkWimYso/OR7XbLcLyswDA9n3XPNq+Dq1NJ DYgWoI5AW590W1PNycosp6oVQf2XWb/UEC1bpPeRdLaUiVK+tvEDqKXO2WTJZCRLNA sPF1+bgETUiblyURBkBRBigpcuY8gIrfdiIiKt9s= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jiada Wang , Simon Horman , Daniel Lezcano , Eduardo Valentin , Sasha Levin , linux-pm@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 017/141] thermal: rcar_gen3_thermal: disable interrupt in .remove Date: Sat, 1 Jun 2019 09:19:53 -0400 Message-Id: <20190601132158.25821-17-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190601132158.25821-1-sashal@kernel.org> References: <20190601132158.25821-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org From: Jiada Wang [ Upstream commit 63f55fcea50c25ae5ad45af92d08dae3b84534c2 ] 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: Simon Horman Reviewed-by: Daniel Lezcano Signed-off-by: Eduardo Valentin Signed-off-by: Sasha Levin --- 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 7aed5337bdd35..704c8ad045bb5 100644 --- a/drivers/thermal/rcar_gen3_thermal.c +++ b/drivers/thermal/rcar_gen3_thermal.c @@ -328,6 +328,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.20.1