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 B6426382394; Wed, 8 Apr 2026 07:31:54 +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=1775633514; cv=none; b=W8U2cAEXztuguWopj6ZchOWF6foLxBwIK845/vrLGMujXXsSRt/X0LsQpXTEijRSzadG5UXyR2156JVqmn5LoVZji+rLsPmV8aWn9V6b3S53yNVd4wgWIop1ENkm3Cn2KPvgGsIIW47BiaqrdzLgmBBjCBfmOlr4VACa0UpX3IM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775633514; c=relaxed/simple; bh=dHtIUpJe5O9O5vYplwuFO+s0enNeFKqbjvD27gE7yVg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=elCs0zB71brL9stwzwT0vHQtDp3JqxlwSPK0JLd1uj2zq2J780PiDe3fQGjbKJvKPnPcQ3BhwCiV46UZWtgGppwS4tJWPeCnU4u//1BdLH0Lq/FJnt/3JRPsdAo5WkP7XTJj334fOgiV1cxg6OaFjz1JDUCophUGpWgA0iOFrBE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XOU/doeV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XOU/doeV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60F94C19425; Wed, 8 Apr 2026 07:31:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1775633514; bh=dHtIUpJe5O9O5vYplwuFO+s0enNeFKqbjvD27gE7yVg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XOU/doeVTSd4plLbqFcraRosHoTrlJpqYEYBmORwml/9X63ZXU6a99tLwAFkmJQSn NlA8tjQMcZcu1FRlW3fIGugxLhpwj4iToEK8fy5PlpO5TkaaGNKlNpS5bie7P3BdIt rUTwUAYPVVZc3e3U/LbEuTnGVEX3fUlev7ikM/R/AeyYXUGp9GI0fJL7LGUEC2sE4C l/rSXEpW6Zl8RBV6hbKVqD+vrMxywUInuCr0PJTVB2HpwyoBivdxHkAj9OmnQujz1h rhtjG1eS6qtRyZiBnlVSzToVPEKkH2dj6IOGfgFUyqG7ZDs8IsfKYgt4U114n7KU5X kg5Ke/gj+BEqA== Received: from johan by xi.lan with local (Exim 4.98.2) (envelope-from ) id 1wANOB-000000001Md-40xV; Wed, 08 Apr 2026 09:31:51 +0200 From: Johan Hovold To: Mark Brown Cc: Liam Girdwood , Marek Vasut , Bartosz Golaszewski , Matthias Brugger , AngeloGioacchino Del Regno , Krzysztof Kozlowski , =?UTF-8?q?Andr=C3=A9=20Draszik?= , Douglas Anderson , linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org, Sebastian Reichel Subject: [PATCH v2 2/7] regulator: rk808: fix OF node reference imbalance Date: Wed, 8 Apr 2026 09:30:50 +0200 Message-ID: <20260408073055.5183-3-johan@kernel.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260408073055.5183-1-johan@kernel.org> References: <20260408073055.5183-1-johan@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The driver reuses the OF node of the parent multi-function device but fails to take another reference to balance the one dropped by the platform bus code when unbinding the MFD and deregistering the child devices. Fix this by using the intended helper for reusing OF nodes. Fixes: 647e57351f8e ("regulator: rk808: reduce 'struct rk808' usage") Cc: stable@vger.kernel.org # 6.2 Reviewed-by: Sebastian Reichel Reviewed-by: Douglas Anderson Signed-off-by: Johan Hovold --- drivers/regulator/rk808-regulator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/regulator/rk808-regulator.c b/drivers/regulator/rk808-regulator.c index e66408f23bb6..1e956153427e 100644 --- a/drivers/regulator/rk808-regulator.c +++ b/drivers/regulator/rk808-regulator.c @@ -2114,8 +2114,7 @@ static int rk808_regulator_probe(struct platform_device *pdev) struct regmap *regmap; int ret, i, nregulators; - pdev->dev.of_node = pdev->dev.parent->of_node; - pdev->dev.of_node_reused = true; + device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent); regmap = dev_get_regmap(pdev->dev.parent, NULL); if (!regmap) -- 2.52.0