From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 03CA93D3D18 for ; Fri, 27 Feb 2026 13:56:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200600; cv=none; b=m6fkTiw9C9naBqMThkKau8gJ/7BdmXg3Kq5DKeUkcPrSCECeIZMj7Yrm8F4fuq1fiCEmCW/x556fuOYxcxw9Lk6cKMQ63ajkBQU57UwVFHRcpuTS8C12KNVhyTFMQs7gr7XpNHbplniyPakMTdoL3m7z4uUOfizyjrvrFiVihcE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772200600; c=relaxed/simple; bh=pNJgxM3Q6VrVRA/ImgG+f9Z478N2c1kQ4rp0wHmYr48=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kQ0n3zukUXJSsOccjKDDQTjttYXJdad91yxFlOE4fNNPoVsUDkxffPsRlSZ+rdU+rLmGAYMUVhcZbwWFG8C1uoNKiQ0PBbkI4w1+uEYgmDZf6dMW+8OzQVY4YPt0aurig/aEPiKqXVj1S7/hD/HXCvJGluFNM+QF0lb5YNpuMZk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=jGhZx8PJ; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="jGhZx8PJ" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id C05464E419E2; Fri, 27 Feb 2026 13:56:37 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 92DE15FE74; Fri, 27 Feb 2026 13:56:37 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 6D7FC10369455; Fri, 27 Feb 2026 14:56:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1772200594; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=giDCWLXbUuWTQUHzm6UggcAb1bsu7moyMro/sWeCGf0=; b=jGhZx8PJrbMwPBPMfvny+dV7ub/XVihGdmVg60FmlgEwQsT3McZeT4TF6df3IeOcVRQmjv ZcNWgCT9LDE7ZsLwW6LdCLBR08RKbJh4riD5zyleqo6JCuuBgLxIsboxhJ17u1ef914dnm Qyez2m03CDDTvGmEuRFP9+BdpVsCyfDKS7qHEldb+8FiRgzlmKUWnA2ZvhwW2gIbX7QBOd /V3C2XY/hjjywgf+9G0xLJlfEJiqnoL34bfkISVVQHLc21E1tS5ypuhtG/sTnakXswvyus a5Iw8WPBPrXEBIKEG2zce+Dh1WgN+virvi5wUB/v5QqaeM70Cza5ZFz4ktuQfw== From: Herve Codina To: Andrew Lunn , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Geert Uytterhoeven , Kalle Niemi , Matti Vaittinen , Greg Kroah-Hartman , "Rafael J. Wysocki" , Danilo Krummrich , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Michael Turquette , Stephen Boyd , Andi Shyti , Wolfram Sang , Peter Rosin , Arnd Bergmann , Herve Codina , Saravana Kannan , Bjorn Helgaas , Charles Keepax , Richard Fitzgerald , David Rhodes , Linus Walleij , Ulf Hansson , Mark Brown , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Davidlohr Bueso , Jonathan Cameron , Dave Jiang , Alison Schofield , Vishal Verma , Ira Weiny , Dan Williams , Shawn Guo Cc: Wolfram Sang , linux-kernel@vger.kernel.org, driver-core@lists.linux.dev, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-sound@vger.kernel.org, patches@opensource.cirrus.com, linux-gpio@vger.kernel.org, linux-pm@vger.kernel.org, linux-spi@vger.kernel.org, linux-acpi@vger.kernel.org, linux-cxl@vger.kernel.org, Allan Nielsen , Horatiu Vultur , Steen Hegelund , Luca Ceresoli , Thomas Petazzoni Subject: [PATCH v5 05/28] bus: simple-pm-bus: Remove child devices when the bus is unbound Date: Fri, 27 Feb 2026 14:54:02 +0100 Message-ID: <20260227135428.783983-6-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260227135428.783983-1-herve.codina@bootlin.com> References: <20260227135428.783983-1-herve.codina@bootlin.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 During its probe, the simple-pm-bus driver (simple-pm-bus compatible variant) populates its child devices but it doesn't touch them during its removal. This leads to bus child devices present and bound to drivers whereas the bus itself is unbound. Be consistent and remove child devices when the bus itself is unbound. Signed-off-by: Herve Codina --- drivers/bus/simple-pm-bus.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/bus/simple-pm-bus.c b/drivers/bus/simple-pm-bus.c index 3f00d953fb9a..9ebd588ea24f 100644 --- a/drivers/bus/simple-pm-bus.c +++ b/drivers/bus/simple-pm-bus.c @@ -83,6 +83,9 @@ static void simple_pm_bus_remove(struct platform_device *pdev) dev_dbg(&pdev->dev, "%s\n", __func__); + if (pdev->dev.of_node) + of_platform_depopulate(&pdev->dev); + pm_runtime_disable(&pdev->dev); } -- 2.53.0