* [PATCH] spmi: hisi-spmi-controller: Drop duplicated OF node assignment in spmi_controller_probe()
@ 2025-01-16 4:49 Joe Hattori
2025-01-16 22:48 ` Stephen Boyd
0 siblings, 1 reply; 2+ messages in thread
From: Joe Hattori @ 2025-01-16 4:49 UTC (permalink / raw)
To: mchehab+huawei, sboyd
Cc: linux-kernel, konradybcio, matthias.bgg,
angelogioacchino.delregno, marijn.suijten, bjorn.andersson,
abel.vesa, linux-arm-kernel, linux-mediatek, Joe Hattori
spmi_controller_probe() assigns a parent device and an OF node to an
SPMI controller. However, the operations are not needed as they are
already assigned in spmi_controller_alloc(). Thus, remove the duplicated
assignments. An unnecessary OF node reference acquisition is also
dropped by this patch.
Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Suggested-by: Stephen Boyd <sboyd@kernel.org>
---
drivers/spmi/hisi-spmi-controller.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/spmi/hisi-spmi-controller.c b/drivers/spmi/hisi-spmi-controller.c
index 3cafdf22c909..122140b97579 100644
--- a/drivers/spmi/hisi-spmi-controller.c
+++ b/drivers/spmi/hisi-spmi-controller.c
@@ -300,9 +300,6 @@ static int spmi_controller_probe(struct platform_device *pdev)
spin_lock_init(&spmi_controller->lock);
- ctrl->dev.parent = pdev->dev.parent;
- ctrl->dev.of_node = of_node_get(pdev->dev.of_node);
-
/* Callbacks */
ctrl->read_cmd = spmi_read_cmd;
ctrl->write_cmd = spmi_write_cmd;
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] spmi: hisi-spmi-controller: Drop duplicated OF node assignment in spmi_controller_probe()
2025-01-16 4:49 [PATCH] spmi: hisi-spmi-controller: Drop duplicated OF node assignment in spmi_controller_probe() Joe Hattori
@ 2025-01-16 22:48 ` Stephen Boyd
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2025-01-16 22:48 UTC (permalink / raw)
To: Joe Hattori, mchehab+huawei
Cc: linux-kernel, konradybcio, matthias.bgg,
angelogioacchino.delregno, marijn.suijten, bjorn.andersson,
abel.vesa, linux-arm-kernel, linux-mediatek, Joe Hattori
Quoting Joe Hattori (2025-01-15 20:49:07)
> spmi_controller_probe() assigns a parent device and an OF node to an
> SPMI controller. However, the operations are not needed as they are
> already assigned in spmi_controller_alloc(). Thus, remove the duplicated
> assignments. An unnecessary OF node reference acquisition is also
> dropped by this patch.
>
> Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
> Suggested-by: Stephen Boyd <sboyd@kernel.org>
> ---
Applied to spmi-next
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-16 22:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-16 4:49 [PATCH] spmi: hisi-spmi-controller: Drop duplicated OF node assignment in spmi_controller_probe() Joe Hattori
2025-01-16 22:48 ` Stephen Boyd
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox