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 0FF743E51E1 for ; Fri, 15 May 2026 08:30: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=1778833800; cv=none; b=YnVykDBvmLqZo5K4aQwlsXZJkk1QhMImB0HrqaKWQpjeI3CvGlATp/Xp0+XdJcbZilzblbmAmAGk6p6j4IeK8hc+XtzSzFe+HHSwq7DDjuxCclrOMN2HfMWOI0QmbLZhmBseFqizlIFIAVXlEyDFrK8QSu98q3yVc7LtsRcINUs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778833800; c=relaxed/simple; bh=qnoAXAIH9hVNZkP9kY7RsiP9GgTj0e4dPjytVzD1P/I=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=MNvc5AzHpECS7S9BoIaXXSnhEsNo6xQKzBk2QBADQyrFvh5sqvzdIMN3PeXBTZ196Y3IA5kWThS15qxNsPZdukT4QBPl25D2uJBFSGoPmhNjrUtRgDMWZbPMUyko++k9F0uYdMTZ+LXFkcSSUP7fe7mLK/0CE8OddH/qYndzgRw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rKmxDCsS; 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="rKmxDCsS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 93EC2C2BCB0; Fri, 15 May 2026 08:29:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778833799; bh=qnoAXAIH9hVNZkP9kY7RsiP9GgTj0e4dPjytVzD1P/I=; h=Subject:To:Cc:From:Date:From; b=rKmxDCsSySeClRKyNfDhbYBV6ykDEnJ98LNPW2zcm+SZfgTon5EdHzgmkcJCwbYZo fsa+2l9W2v/bUQH9tilgoxmBF/pPFDheWB+ocV9AELX4rNmgZuEpVTxUHc0MCWFFIX 28MIUy2RtNXMsWlKZOGPytB0TGDjyz8u2pwRdymM= Subject: FAILED: patch "[PATCH] spi: sprd: fix controller deregistration" failed to apply to 5.10-stable tree To: johan@kernel.org,broonie@kernel.org,lanqing.liu@spreadtrum.com Cc: From: Date: Fri, 15 May 2026 10:29:34 +0200 Message-ID: <2026051534-gem-countable-72a1@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 123d17dbc5f07059752fa5e616385ca29a8f935a # git commit -s git send-email --to '' --in-reply-to '2026051534-gem-countable-72a1@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 123d17dbc5f07059752fa5e616385ca29a8f935a Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Fri, 10 Apr 2026 10:17:46 +0200 Subject: [PATCH] spi: sprd: fix controller deregistration Make sure to deregister the controller before disabling underlying resources like clocks during driver unbind. Note that the controller is suspended before disabling and releasing resources since commit de082d866cce ("spi: sprd: Add the SPI irq function for the SPI DMA mode") which avoids issues like unclocked accesses but prevents SPI device drivers from doing I/O during deregistration. Fixes: e7d973a31c24 ("spi: sprd: Add SPI driver for Spreadtrum SC9860") Cc: stable@vger.kernel.org # 4.20 Cc: Lanqing Liu Signed-off-by: Johan Hovold Link: https://patch.msgid.link/20260410081757.503099-17-johan@kernel.org Signed-off-by: Mark Brown diff --git a/drivers/spi/spi-sprd.c b/drivers/spi/spi-sprd.c index 0f9fc320363c..fd3fd0ce122c 100644 --- a/drivers/spi/spi-sprd.c +++ b/drivers/spi/spi-sprd.c @@ -977,7 +977,7 @@ static int sprd_spi_probe(struct platform_device *pdev) goto err_rpm_put; } - ret = devm_spi_register_controller(&pdev->dev, sctlr); + ret = spi_register_controller(sctlr); if (ret) goto err_rpm_put; @@ -1008,7 +1008,9 @@ static void sprd_spi_remove(struct platform_device *pdev) if (ret < 0) dev_err(ss->dev, "failed to resume SPI controller\n"); - spi_controller_suspend(sctlr); + spi_controller_get(sctlr); + + spi_unregister_controller(sctlr); if (ret >= 0) { if (ss->dma.enable) @@ -1017,6 +1019,8 @@ static void sprd_spi_remove(struct platform_device *pdev) } pm_runtime_put_noidle(&pdev->dev); pm_runtime_disable(&pdev->dev); + + spi_controller_put(sctlr); } static int __maybe_unused sprd_spi_runtime_suspend(struct device *dev)