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 7F2653914FA for ; Fri, 15 May 2026 08:30:40 +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=1778833840; cv=none; b=BecNDT1V6OKR84+fl+7tfpU0043iagjLWMz2iWzAaLy//ji4iAI+CxENofK/7B4mes4XTwg6DXSJAdBjQfNnjX6VangYXe7dGXFoz0sXCmTPVaiAw7CLIG1iBejZ43OhYVgpNYQbnFfrO9fgrd0caPTr1koqu+tBXz2ZMs6E//w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778833840; c=relaxed/simple; bh=tMm0cIm2UC2ixQ4FsySwtPt1vFeq2XiGYOqY4Ie1vng=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=QzeEfZCxHSbnOLLBj/VyHOP0FZWRf3GSn7l7LEY1o12E0Bx409JPYhOJWpo6frQiXiCLWoBTxOPKR1bT4PVk0T0zW+iIJGFBWJYLoQKPM9TvcdYAVDEC34mT6UuCSmlGhZ5AR4zyyoPHsmHvWP+04Dl61vFlw4H+l72cGa0r830= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CrrfvbIJ; 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="CrrfvbIJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0E039C2BCB0; Fri, 15 May 2026 08:30:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778833840; bh=tMm0cIm2UC2ixQ4FsySwtPt1vFeq2XiGYOqY4Ie1vng=; h=Subject:To:Cc:From:Date:From; b=CrrfvbIJ6NaArx63WTnK97yuOggBt4i3Jexkvr+8OMUOPA3Kb0achGL3uMI9ojp0t powH1A029aMuNfHluegJGYOaq85c5U8dnKYGq+CrMf0iZY5kTEXCDC2rETNFe49Md3 TPYlXNdMN+k0EHw0WBCTLz8hOKE9qy/JisSSyNMs= Subject: FAILED: patch "[PATCH] spi: slave-mt27xx: fix controller deregistration" failed to apply to 6.6-stable tree To: johan@kernel.org,broonie@kernel.org,leilk.liu@mediatek.com Cc: From: Date: Fri, 15 May 2026 10:30:06 +0200 Message-ID: <2026051506-kinship-parlor-30e1@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.6-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.6.y git checkout FETCH_HEAD git cherry-pick -x ab840cbda4fe6c40e52f6415c47056797c663bb2 # git commit -s git send-email --to '' --in-reply-to '2026051506-kinship-parlor-30e1@gregkh' --subject-prefix 'PATCH 6.6.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From ab840cbda4fe6c40e52f6415c47056797c663bb2 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Fri, 10 Apr 2026 10:17:45 +0200 Subject: [PATCH] spi: slave-mt27xx: fix controller deregistration Make sure to deregister the controller before disabling underlying resources like clocks (by disabling runtime PM) during driver unbind. Fixes: 805be7ddf367 ("spi: mediatek: add spi slave for Mediatek MT2712") Cc: stable@vger.kernel.org # 4.20 Cc: Leilk Liu Signed-off-by: Johan Hovold Link: https://patch.msgid.link/20260410081757.503099-16-johan@kernel.org Signed-off-by: Mark Brown diff --git a/drivers/spi/spi-slave-mt27xx.c b/drivers/spi/spi-slave-mt27xx.c index ce889cb33228..7aedeaa5889d 100644 --- a/drivers/spi/spi-slave-mt27xx.c +++ b/drivers/spi/spi-slave-mt27xx.c @@ -453,7 +453,7 @@ static int mtk_spi_slave_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); - ret = devm_spi_register_controller(&pdev->dev, ctlr); + ret = spi_register_controller(ctlr); clk_disable_unprepare(mdata->spi_clk); if (ret) { dev_err(&pdev->dev, @@ -473,7 +473,15 @@ static int mtk_spi_slave_probe(struct platform_device *pdev) static void mtk_spi_slave_remove(struct platform_device *pdev) { + struct spi_controller *ctlr = platform_get_drvdata(pdev); + + spi_controller_get(ctlr); + + spi_unregister_controller(ctlr); + pm_runtime_disable(&pdev->dev); + + spi_controller_put(ctlr); } #ifdef CONFIG_PM_SLEEP