From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 35A99261B9E; Sat, 30 May 2026 17:53:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780163600; cv=none; b=NP9SIiS2cjvumkX3MPsGN7TJ122jL5BldaxmD7Lv6IOEOMmkWCmdnW1fLNUUngmM79OBGlB+qobM7k7O7fP7vyeYjf7PHwlqL/H6SwkxnfKL/T92CrsiIQ0vDPTymRvr81bXSwtsJcWrtQHwl7ooaJQlZ4wflYYf0iKIyROFe00= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780163600; c=relaxed/simple; bh=nUSIcGIz9qykFq1snfpFAlEdQGh5+dQ0tFdENS50Atk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Z94+yXfjE35KUa4+45HGlIe1NJxOLn9xlJ0QCOuMfAlHT+DQ8SDCuT6Tn78zh7wLCzwl3pTUUNDPU9QQeRaMXWqo9vx3dySrqs6TezKi6Ib3Q1dxMzmNfGRZt63atIVi3Y3EBhgUI6m8gBL3xKJtZcroEP4cufuSCULMP1GtKMk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=iPeoSpcx; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="iPeoSpcx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76C571F00893; Sat, 30 May 2026 17:53:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780163598; bh=zpJC14mk2NHHFvuxBsfjIpCh7xSw2Vu6D0EejRwXW94=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=iPeoSpcxm98ffHszemVbv1UknR8Bj+7Y8wJfIUEFhEngWnAleHdZmaf1psoJ6NGUA Tq72gyR5Bygt6RZLDoOUae9R73V3RvAEn1sD6ZErd3SssMh0El295AnOwOs0aoskb1 OBliLKM78dKEYIgnZguhiNXtHQV9FtwviB2ikkMk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ranjit Waghmode , Johan Hovold , Mark Brown Subject: [PATCH 5.15 307/776] spi: zynqmp-gqspi: fix controller deregistration Date: Sat, 30 May 2026 18:00:21 +0200 Message-ID: <20260530160248.499815440@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260530160240.228940103@linuxfoundation.org> References: <20260530160240.228940103@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johan Hovold commit 6895fc4faafc9082e15e4e624b23dd5f0c98feb5 upstream. Make sure to deregister the controller before disabling underlying resources like clocks during driver unbind. Fixes: dfe11a11d523 ("spi: Add support for Zynq Ultrascale+ MPSoC GQSPI controller") Cc: stable@vger.kernel.org # 4.2: 64640f6c972e Cc: stable@vger.kernel.org # 4.2 Cc: Ranjit Waghmode Signed-off-by: Johan Hovold Link: https://patch.msgid.link/20260410081757.503099-26-johan@kernel.org Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-zynqmp-gqspi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/spi/spi-zynqmp-gqspi.c +++ b/drivers/spi/spi-zynqmp-gqspi.c @@ -1183,7 +1183,7 @@ static int zynqmp_qspi_probe(struct plat ctlr->dev.of_node = np; ctlr->auto_runtime_pm = true; - ret = devm_spi_register_controller(&pdev->dev, ctlr); + ret = spi_register_controller(ctlr); if (ret) { dev_err(&pdev->dev, "spi_register_controller failed\n"); goto clk_dis_all; @@ -1224,6 +1224,8 @@ static void zynqmp_qspi_remove(struct pl pm_runtime_get_sync(&pdev->dev); + spi_unregister_controller(xqspi->ctlr); + zynqmp_gqspi_write(xqspi, GQSPI_EN_OFST, 0x0); pm_runtime_disable(&pdev->dev);