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 640BC3033FC for ; Fri, 15 May 2026 05:28:16 +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=1778822896; cv=none; b=M6V/tM8qtNgRY2KK4Z1S4KgkjDqQ/8c5H8xTkJQ+A9hIy9HXNpAJuaOn2Ws7KTwmldD3dzt8+TG1PaD6ejXhWPsuxzbRSO+/ulvIL80DhpzybRT5VCBcb4XvbbkqPa6gHn+usHIs1pco1oQOhK9yfdeLj3OGAvXsQxFfsZEOLrs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778822896; c=relaxed/simple; bh=PT6htD2hpSKfBwH0nCVDQb94IF110WTZuD3WqfTYABo=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=aRJbjgOsA403HVZ77DkWisSnY1JCY006QmWy1KzH4epDpAWmjNmFwVbjgoOzhO2WuTPRoW8B2SMRGgRMJQJJdHGo1H0mAlw48Uf66Ch6T5MQhj320ug2sEovKs8Vg85OcnDm3nWDqAkSNl1NtyNMT69QyjvieyhwT/YXpSgBTmg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nOnz18+x; 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="nOnz18+x" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D0373C2BCB0; Fri, 15 May 2026 05:28:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778822896; bh=PT6htD2hpSKfBwH0nCVDQb94IF110WTZuD3WqfTYABo=; h=Subject:To:Cc:From:Date:From; b=nOnz18+x+15qjkks/uaU6p0vQD6K1V5KH0KRlgz43njlL3+0nmF7+CCHyMR7N7WbR kMQ+1b03vaiTDkeZ3VcUxLGsyd/t68BPtEvxtqkJ3efcTWzj2hvyz/C8VvtLL0tosF svArFlKCsY8slWc+gfOcTzz7rp7qGvqPlr/3vVqo= Subject: FAILED: patch "[PATCH] spi: atmel: fix controller deregistration" failed to apply to 5.15-stable tree To: johan@kernel.org,broonie@kernel.org Cc: From: Date: Fri, 15 May 2026 07:28:16 +0200 Message-ID: <2026051516-blend-preshow-eca2@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.15-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.15.y git checkout FETCH_HEAD git cherry-pick -x 8d4de97e83520be89d0ff40610ca633b3963a7de # git commit -s git send-email --to '' --in-reply-to '2026051516-blend-preshow-eca2@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 8d4de97e83520be89d0ff40610ca633b3963a7de Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Thu, 9 Apr 2026 14:04:03 +0200 Subject: [PATCH] spi: atmel: fix controller deregistration Make sure to deregister the controller before disabling underlying resources like clocks during driver unbind. Fixes: 754ce4f29937 ("[PATCH] SPI: atmel_spi driver") Cc: stable@vger.kernel.org # 2.6.21 Signed-off-by: Johan Hovold Link: https://patch.msgid.link/20260409120419.388546-5-johan@kernel.org Signed-off-by: Mark Brown diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index 445d645585bf..42db85d7ff8e 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -1654,7 +1654,7 @@ static int atmel_spi_probe(struct platform_device *pdev) pm_runtime_set_active(&pdev->dev); pm_runtime_enable(&pdev->dev); - ret = devm_spi_register_controller(&pdev->dev, host); + ret = spi_register_controller(host); if (ret) goto out_free_dma; @@ -1688,8 +1688,12 @@ static void atmel_spi_remove(struct platform_device *pdev) struct spi_controller *host = platform_get_drvdata(pdev); struct atmel_spi *as = spi_controller_get_devdata(host); + spi_controller_get(host); + pm_runtime_get_sync(&pdev->dev); + spi_unregister_controller(host); + /* reset the hardware and block queue progress */ if (as->use_dma) { atmel_spi_stop_dma(host); @@ -1716,6 +1720,8 @@ static void atmel_spi_remove(struct platform_device *pdev) pm_runtime_put_noidle(&pdev->dev); pm_runtime_disable(&pdev->dev); + + spi_controller_put(host); } static int atmel_spi_runtime_suspend(struct device *dev)