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 A8389C28CC1 for ; Sat, 1 Jun 2019 13:33:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 786A62750B for ; Sat, 1 Jun 2019 13:33:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559396015; bh=SovqSDY+tOTcIoKxLNZu5AMwUZmBZoOg3wouGlrx9zM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=2YkhZ14BufAeRV7GPa9tcQ3ZpBNq/e0Glq2PYUxkqw/C6fset9YCc4C7vJ2CuU8Sa 8SbcavMaQEoVP6BZzC+8VHt3A7QpMLZzA4qL3IYn7VoCtzr41B7KhqN9VBIwIvokgF X5PD7XMtfmAqbr6/nvbQkEIMBzdV+CxTrY9qbDZk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729215AbfFANY1 (ORCPT ); Sat, 1 Jun 2019 09:24:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:54454 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729207AbfFANYY (ORCPT ); Sat, 1 Jun 2019 09:24:24 -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 301E727378; Sat, 1 Jun 2019 13:24:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559395464; bh=SovqSDY+tOTcIoKxLNZu5AMwUZmBZoOg3wouGlrx9zM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XquYsvpS3fAkPlI0R8Fa+QlV6ebIvtTWOMPOYSbOBo9+AJT5Rf312DcSWd5iAm6ge aZCnM2OvZz6meQHR0ylhBnLVuV+eSSOhDW26MeQdiR17+oMGjGXms1KqYksr0mvefI nUOPospiXvOBSG+Nlf9D9eQj+MdTbhv+kKrIm0WE= 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.14 14/99] thermal: rcar_gen3_thermal: disable interrupt in .remove Date: Sat, 1 Jun 2019 09:22:21 -0400 Message-Id: <20190601132346.26558-14-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190601132346.26558-1-sashal@kernel.org> References: <20190601132346.26558-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 203aca44a2bb4..0afdda2db3a07 100644 --- a/drivers/thermal/rcar_gen3_thermal.c +++ b/drivers/thermal/rcar_gen3_thermal.c @@ -342,6 +342,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