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 EFD95313532 for ; Fri, 15 May 2026 05:31:00 +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=1778823061; cv=none; b=VswKnyLhOb+MBDZO6Aoi5cesJ76ufT5ki7zUA01xJJEbXumx7JwJgf5DBo16n2HEONEtOMRvgLk6OjUxjt8JeELvxyri0wHkiu7Dq1BJL/zq/3klWdyAJoF8u6D7xZnhwhjT8PdAiltJCT3ZNZiMhHSvl5fBQGdpE5Ry1P1kbHI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778823061; c=relaxed/simple; bh=S+XN2lgadJiQu/pvjuRA13TA2WA97ZLcVgEaN83Y9N8=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=jG1cvzwVdRRzU0GTzDgSqt16zyq3BH2xFKhEqP49zxxMB9yW4qkLTmpRqi1Sd9lBYXcZzqWf6DU08PHoy0rmPZqJujipaPFjtMRbhBsSlsTJQMK1jh4cDGdjdDJDzPvVPMJJMLZZ8xOxWDoIE8kHfLJ1w6/+gAG5zWYNpt/Xv2k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jZ+cBac2; 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="jZ+cBac2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30D8AC2BCB8; Fri, 15 May 2026 05:30:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778823060; bh=S+XN2lgadJiQu/pvjuRA13TA2WA97ZLcVgEaN83Y9N8=; h=Subject:To:Cc:From:Date:From; b=jZ+cBac226UeRNzikx55FAkZOeswGcMHRfk3p0YPSfwOzJL8PATVF2fAfBAkIdGY1 i4R/Cczs2m1xDvgjjJ9M5eBxueHXC3r8pOElKdmt5V3s5pj79RtevgffLbxopxWcYd RabDfkdTd372ipMxKJUJzF4KYEO6FOwxPLgu3230= Subject: FAILED: patch "[PATCH] spi: sifive: fix controller deregistration" failed to apply to 5.10-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-tarnish-moisten-9082@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 5.10-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-5.10.y git checkout FETCH_HEAD git cherry-pick -x 0f25236694a2854627c1597465a071e6bb6fe572 # git commit -s git send-email --to '' --in-reply-to '2026051547-tarnish-moisten-9082@gregkh' --subject-prefix 'PATCH 5.10.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)