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 CE4432236E3 for ; Fri, 15 May 2026 05:30:55 +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=1778823055; cv=none; b=ty2WuhxA7dYZZUnOLMjwMh6maL7R9VkYRNTPaOFHngOP4Y84xsQB96akoDetSlGMRyicyPKpyO4HLdZiN8pbRwv2TncEGAAlxSTm7aSV9w88mze2c+O3ABqD1JNh2PyAMtnaAengV2TVqHj5oBSYyZ/+2B7OFuoaGeC2HYqwP74= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778823055; c=relaxed/simple; bh=y5A5flOkwYnA9PxewUfsm1E+KRaUmHkYeR2Qis0Zfpg=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=CaJuVZyZcFCsxhB79xFaeonnhJ4TUu3SNNBIilvdcgdka5A7KHEis1O941vQPxoCEsgnmrlplONTRehxXixkm6srg/+ZmCSsUXcORPKVsltYvE6d5jCVj7YhtXV7+G4tQe6YWcoud62ZCNXUrvMR8DoSzYcgvQKGYH12zP+VzhQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=M7UcrZYF; 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="M7UcrZYF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06A8CC2BCB8; Fri, 15 May 2026 05:30:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778823055; bh=y5A5flOkwYnA9PxewUfsm1E+KRaUmHkYeR2Qis0Zfpg=; h=Subject:To:Cc:From:Date:From; b=M7UcrZYFCFOgggzXeL9NkLW9u25X81jzi4xC/cvAyrrh3IXAf02UfvuH4ZzStz+vv /LdPFf7I2sC1ieYIhBqtztw1U3YjJ595q0DVxXo/VHSsu6TuGUGxL9E+BprcL499Ds GaOx9yAmYT2RJ2oxVp2m8ZPq4CFKeo1XBGT6XmSk= Subject: FAILED: patch "[PATCH] spi: sifive: fix controller deregistration" failed to apply to 6.1-stable tree To: johan@kernel.org,broonie@kernel.org,yash.shah@sifive.com Cc: From: Date: Fri, 15 May 2026 07:30:47 +0200 Message-ID: <2026051547-october-glutton-60c6@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 6.1-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-6.1.y git checkout FETCH_HEAD git cherry-pick -x 0f25236694a2854627c1597465a071e6bb6fe572 # git commit -s git send-email --to '' --in-reply-to '2026051547-october-glutton-60c6@gregkh' --subject-prefix 'PATCH 6.1.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)