Re: [PATCH v2] spmi: Fix controller->node != parent->node breakage

From: Joe Hattori
Date: Wed Jan 15 2025 - 23:54:26 EST




On 1/16/25 08:16, Stephen Boyd wrote:
Quoting Konrad Dybcio (2025-01-14 12:37:20)
On 1/14/25 19:30, Stephen Boyd wrote:

Ok, I see that I was reading the already reverted state of the tree
where the 'ctrl->dev.of_node = node' assignment came back. So there's
nothing to do besides drop the patch in fixes, which I already did. We
can then apply this patch to drop the duplicate assignment as a cleanup
and to avoid a refcount bump on the of_node that isn't needed.

----8<---
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;

That works for me, thank you


Joe, care to send this patch to replace the one you sent previously?

Thank you for the fix and the suggestion. I just sent a patch removing the three lines [1].

[1]: https://lore.kernel.org/all/20250116044725.2946205-1-joe@xxxxxxxxxxxxxxxxxxxxx/

Best,
Joe