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 99E223E5ED0 for ; Wed, 25 Mar 2026 14:37:32 +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=1774449454; cv=none; b=jo1VvsqhoHXf266DAx6+4HuBKXRRBkEoLcfq2x3v4DMCCWS7BjIQhSHA+BYV3COuS/B2/o8Hnkf+YX70o7UPr1HWv7zzCy8DlgtNXMxgI/PfuqV5oypmQTMAp/PWx0yxWtfnzwTtry9En6bfitpziSu/jG8SQEzpkqAWdrVa3WY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774449454; c=relaxed/simple; bh=pNJgxM3Q6VrVRA/ImgG+f9Z478N2c1kQ4rp0wHmYr48=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RtxOXqVr5mbbjA6G7d8lOhXLombwbCdeBEue3+KQw/8n4hJ4jXrXqf9cIHBFKiJIvYbDpYywlTGzsJu1tJI7bDweRa50NniUuxYuQN0JpJd7C1XTd22QK2yKMuE7YqRijvW5kbK466aZEbIGwc++Mwe7qzjo7U0Z1OJdCCwqzgw= 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=OkUF+xwg; 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="OkUF+xwg" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 519D64E427EF; Wed, 25 Mar 2026 14:37:31 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 227F1601FA; Wed, 25 Mar 2026 14:37:31 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 2782410451411; Wed, 25 Mar 2026 15:37:08 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1774449447; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=giDCWLXbUuWTQUHzm6UggcAb1bsu7moyMro/sWeCGf0=; b=OkUF+xwg+KzGLtZZeuTeipRi19HlS9OGToxlwsayITguVCVP9o7jIkr8zer4EEl4/Y/F52 Sr944Fdof3BVGUwEF/QP6h2Qt/of+WzWQbnQAZ6GtAtA8kf1AMo1C8BtcP9x9laPobQr2P rNxGVR3Am3j7BDfHzvgH342IB7vMqZpqvqyBqmrWzpaH1XUAiYxHzXccTL5JvybqsBBc0K TpBRFz144tF6lsrURgh3ewd/XGFxHlLgdA7GJf4xgQHowGCgGIXycrXRj91GABY5pfw510 1eBLxya9Lb4KeWwyyvjszvRu49BFZL9eG52jchJYMRA5c8oRsjocvPl6/HAKwg== 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 v6 04/27] bus: simple-pm-bus: Remove child devices when the bus is unbound Date: Wed, 25 Mar 2026 15:35:31 +0100 Message-ID: <20260325143555.451852-5-herve.codina@bootlin.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260325143555.451852-1-herve.codina@bootlin.com> References: <20260325143555.451852-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