From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53BCD1E9906 for ; Fri, 15 May 2026 05:30:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778823042; cv=none; b=GQHumeHuJd6bRdFUZXbTszotU8iesgK2RPHIspHhiYsSobWq7FHJuC0sBT9EyS6Quy8RkNLVJk6CmSgP8/SrcGa4mqBxm6CP+AolEHrjLjDJnUtJbgvE94LxsZCxTx6XahbEyqgMHxV3hJ5DGVVT3zAlcCtgjQth1kcOJkOUtDg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778823042; c=relaxed/simple; bh=eBykWJ5V86N25wkbVvGBztOJcyqMgax6Qr/4NivQqYQ=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=uE4uWf2h1Cdnguh6oKv4Q60MyzfUP3/tL0P6kSS6sZ0ixwE+95q6x4jFfvS9mRFLClJKPFOgiIxF9tYECz0FFXMfKFvtKCvp9+nE7sWRO8oPmdCSaDUs1Hbs55rIw2AutlF6iOoSjwUs8HlouO83tciuOWdGC5vvlc1LiBxoc9M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1vEfouHU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="1vEfouHU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93F91C2BCB0; Fri, 15 May 2026 05:30:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778823041; bh=eBykWJ5V86N25wkbVvGBztOJcyqMgax6Qr/4NivQqYQ=; h=Subject:To:Cc:From:Date:From; b=1vEfouHU7IqQKl5vtj1hFZxhFxkA/jd6IxYSoA3AtBraLa6RLpFDr9XQVuC6P0MC+ CeutzUGh78n81WHzJo/Cghg0LuOA1SSS2IukVeXqCTf7N9Siffa8KmSIm+ZznInbg/ tUn/zJSl3zVY+UQJcIs+KVlphc8k0nfUQieXVu1g= Subject: FAILED: patch "[PATCH] spi: sifive: fix controller deregistration" failed to apply to 7.0-stable tree To: johan@kernel.org,broonie@kernel.org,yash.shah@sifive.com Cc: From: Date: Fri, 15 May 2026 07:30:46 +0200 Message-ID: <2026051546-gestation-vessel-153b@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 7.0-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-7.0.y git checkout FETCH_HEAD git cherry-pick -x 0f25236694a2854627c1597465a071e6bb6fe572 # git commit -s git send-email --to '' --in-reply-to '2026051546-gestation-vessel-153b@gregkh' --subject-prefix 'PATCH 7.0.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 0f25236694a2854627c1597465a071e6bb6fe572 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Fri, 10 Apr 2026 10:17:44 +0200 Subject: [PATCH] spi: sifive: fix controller deregistration Make sure to deregister the controller before disabling underlying resources like interrupts during driver unbind. Note that clocks were also disabled before the recent commit 140039c23aca ("spi: sifive: Simplify clock handling with devm_clk_get_enabled()"). Fixes: 484a9a68d669 ("spi: sifive: Add driver for the SiFive SPI controller") Cc: stable@vger.kernel.org # 5.1 Cc: Yash Shah Signed-off-by: Johan Hovold Link: https://patch.msgid.link/20260410081757.503099-15-johan@kernel.org Signed-off-by: Mark Brown diff --git a/drivers/spi/spi-sifive.c b/drivers/spi/spi-sifive.c index 54adbc057af6..74a3e32fd2b5 100644 --- a/drivers/spi/spi-sifive.c +++ b/drivers/spi/spi-sifive.c @@ -392,7 +392,7 @@ static int sifive_spi_probe(struct platform_device *pdev) dev_info(&pdev->dev, "mapped; irq=%d, cs=%d\n", irq, host->num_chipselect); - ret = devm_spi_register_controller(&pdev->dev, host); + ret = spi_register_controller(host); if (ret < 0) { dev_err(&pdev->dev, "spi_register_host failed\n"); goto put_host; @@ -411,8 +411,14 @@ static void sifive_spi_remove(struct platform_device *pdev) struct spi_controller *host = platform_get_drvdata(pdev); struct sifive_spi *spi = spi_controller_get_devdata(host); + spi_controller_get(host); + + spi_unregister_controller(host); + /* Disable all the interrupts just in case */ sifive_spi_write(spi, SIFIVE_SPI_REG_IE, 0); + + spi_controller_put(host); } static int sifive_spi_suspend(struct device *dev)