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 40F22401A35 for ; Fri, 15 May 2026 08:30:29 +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=1778833829; cv=none; b=sWJYYaj+fjou1wD4XZAU+m3f1uH0X0CSMsbxsx3LNejIZ+Rfo4wJoj0d/0mWfwpfJJkogsHnV0Ce6bTfC/476ViRlIC26NfO4DBqsXhrV288C/3GbNxHRieLieCm3kwreU7Vf8EDC9QijwS7j3D6IE5q0bpwtrr0FembTfZ9pSw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778833829; c=relaxed/simple; bh=9wOHlZO5n7/g/hG/S1LyB/SqKSKvnR8S7j03bleMD4o=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=nycRG5UC/X9StEKyWZMpFoezsaWijxR0R9+nld8sbKYHg7D0IKceC9tc7Br6KpHFoNM7Kkt912l4cDY2Is89poilLnSy8Fxi5WCcs/BfNMhb8irQ2hbCigAVLRha7FSgnEY81dY/Id/eetkAbct/WFujXkg2FfjTBhQkwgB4zeg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=glFWr5iO; 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="glFWr5iO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8487CC2BCB0; Fri, 15 May 2026 08:30:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778833828; bh=9wOHlZO5n7/g/hG/S1LyB/SqKSKvnR8S7j03bleMD4o=; h=Subject:To:Cc:From:Date:From; b=glFWr5iO6fyYxe9MqhAUkCprZLCpE6/RVZhnWOtHLA53vanDKV54FP+deGwms9QW1 jSnSTLvaxlSEwBr9HQ3sn+9SKXP5WyEwXOfhhZZviqv+oTttJe+1T2ho/iqCZ6Y+h1 pUiVq5VecRVg9PL5aNRpaXH4GNcscSvQ47s4ywZg= Subject: FAILED: patch "[PATCH] spi: slave-mt27xx: fix controller deregistration" failed to apply to 6.12-stable tree To: johan@kernel.org,broonie@kernel.org,leilk.liu@mediatek.com Cc: From: Date: Fri, 15 May 2026 10:30:05 +0200 Message-ID: <2026051505-earflap-siren-605f@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.12-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.12.y git checkout FETCH_HEAD git cherry-pick -x ab840cbda4fe6c40e52f6415c47056797c663bb2 # git commit -s git send-email --to '' --in-reply-to '2026051505-earflap-siren-605f@gregkh' --subject-prefix 'PATCH 6.12.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