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 CC1F23839B0 for ; Tue, 12 May 2026 12:46:58 +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=1778590018; cv=none; b=Ac5OENpib23TOaMCbOKYErkSpAvUUzFIBI1nJreK34Ny8w5686ArbGnwk5YUuClwG+PEzC0PazEFv1RuVtalb6iUiL/rH0fXRXicIBT0W/amxP4+EHSmCIbxpSjb0NPfvlSFNn9fSYoaIKNQHkbiUs3xSjopaiVXZVNdfZEgH8I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778590018; c=relaxed/simple; bh=rUfzPzzXMZqje8a/ldY7fI9/8qO3BDu0/zFSq6XNoeE=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=mz4Pr3EaAKIqLCqvnFLeAQODTb95hlAeZCwm4s9lyHaWdb23R/6PR22QOcalzbiMtrJhDB7NVs7tCRYLfh1+hiCHQf9LD8tX6847tEo+FQ1sTYEzRqzRdgV0EfYJaTwpZ4xBEql3YLWYoy11qL0FPNCvm33II8i6XHD9RlcglbY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=E/a0/dso; 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="E/a0/dso" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A3F1C2BCB0; Tue, 12 May 2026 12:46:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778590018; bh=rUfzPzzXMZqje8a/ldY7fI9/8qO3BDu0/zFSq6XNoeE=; h=Subject:To:Cc:From:Date:From; b=E/a0/dso/bvXknYrS6igrSAd0PqzoFpu58x6006JUkMvLg+GAZWhLLI/eDXgP83pQ ceWKspWykPKJ4zCzH0zHN5vJjHmAsahBaPRmfYfGz/SgNuATBmI15rp3ycqehxaUy6 qrzNK5h2z6Wf+ASJcJ8pNemDWpeaUpIXH7n1SJK4= Subject: FAILED: patch "[PATCH] spi: sun4i: fix controller deregistration" failed to apply to 6.1-stable tree To: johan@kernel.org,broonie@kernel.org,mripard@kernel.org Cc: From: Date: Tue, 12 May 2026 14:45:52 +0200 Message-ID: <2026051252-unproven-faculty-80e7@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 42108a2f03e0fdeabe9d02d085bdb058baa1189f # git commit -s git send-email --to '' --in-reply-to '2026051252-unproven-faculty-80e7@gregkh' --subject-prefix 'PATCH 6.1.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 42108a2f03e0fdeabe9d02d085bdb058baa1189f Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Fri, 10 Apr 2026 10:17:48 +0200 Subject: [PATCH] spi: sun4i: fix controller deregistration Make sure to deregister the controller before disabling underlying resources like clocks during driver unbind. Fixes: b5f6517948cc ("spi: sunxi: Add Allwinner A10 SPI controller driver") Cc: stable@vger.kernel.org # 3.15 Cc: Maxime Ripard Signed-off-by: Johan Hovold Link: https://patch.msgid.link/20260410081757.503099-19-johan@kernel.org Signed-off-by: Mark Brown diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c index bfdf419a583c..b7fbb5270edb 100644 --- a/drivers/spi/spi-sun4i.c +++ b/drivers/spi/spi-sun4i.c @@ -504,7 +504,7 @@ static int sun4i_spi_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); pm_runtime_idle(&pdev->dev); - ret = devm_spi_register_controller(&pdev->dev, host); + ret = spi_register_controller(host); if (ret) { dev_err(&pdev->dev, "cannot register SPI host\n"); goto err_pm_disable; @@ -522,7 +522,15 @@ static int sun4i_spi_probe(struct platform_device *pdev) static void sun4i_spi_remove(struct platform_device *pdev) { + struct spi_controller *host = platform_get_drvdata(pdev); + + spi_controller_get(host); + + spi_unregister_controller(host); + pm_runtime_force_suspend(&pdev->dev); + + spi_controller_put(host); } static const struct of_device_id sun4i_spi_match[] = {