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=-8.7 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 CAE25C31E45 for ; Thu, 13 Jun 2019 16:21:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9A57420644 for ; Thu, 13 Jun 2019 16:21:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560442873; bh=iHI+7P9vkUwbXg6pU2c4Nt3nfaT5GJVSazmp8sMxH+4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=zIQkSVN9dK5Lae1a70ZcHgtjObwoMyxOWdaQx9oUMqNQeZz0e5I5v+JyI1QogZzg2 VwkLDospnh1K8bI+8Tt2+iZ6iaIVlnLfNfIIRAOMtWnY3B2oaCkMx+q4+kxH+33PBK rlZrsD1N/ArAh7Fpd6vC3E8UoZ4O6pWImtWkFLMc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403810AbfFMQVM (ORCPT ); Thu, 13 Jun 2019 12:21:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:56482 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731065AbfFMIi5 (ORCPT ); Thu, 13 Jun 2019 04:38:57 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8B598215EA; Thu, 13 Jun 2019 08:38:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560415137; bh=iHI+7P9vkUwbXg6pU2c4Nt3nfaT5GJVSazmp8sMxH+4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LZXBRHCIjdY/3ipm91iFa9PpSClnFmKRUIXKA+Unt5ca6wW+IhtCETZXCgdTIxvh/ thtugXzgJOUEn2XHmlvprgD+kVDn38cNSvlmKLrW0ImTyYFhqZLrKIOFV2HjjsPU9I q2k5C6A1KW/q7+u3vaMI1NZDq0ZQBItsDorLbm5U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jiada Wang , Simon Horman , Daniel Lezcano , Eduardo Valentin , Sasha Levin Subject: [PATCH 4.19 017/118] thermal: rcar_gen3_thermal: disable interrupt in .remove Date: Thu, 13 Jun 2019 10:32:35 +0200 Message-Id: <20190613075644.637943969@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190613075643.642092651@linuxfoundation.org> References: <20190613075643.642092651@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ 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 7aed5337bdd3..704c8ad045bb 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