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

Joe Hattori joe at pf.is.s.u-tokyo.ac.jp
Wed Jan 15 20:54:13 PST 2025



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@pf.is.s.u-tokyo.ac.jp/

Best,
Joe



More information about the Linux-mediatek mailing list