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

Stephen Boyd sboyd at kernel.org
Wed Jan 15 15:16:10 PST 2025


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?



More information about the Linux-mediatek mailing list