[PATCH v2] mailbox: mtk-cmdq: Move devm_mbox_controller_register() after devm_pm_runtime_enable()

Jason-JH Lin (林睿祥) Jason-JH.Lin at mediatek.com
Thu Jul 18 07:12:58 PDT 2024


Hi Angelo,

Thanks for the reviews.

[snip]
> > ---
> >   drivers/mailbox/mtk-cmdq-mailbox.c | 14 ++++++++------
> >   1 file changed, 8 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c
> > b/drivers/mailbox/mtk-cmdq-mailbox.c
> > index f1dfce9e27f5..002003c3970a 100644
> > --- a/drivers/mailbox/mtk-cmdq-mailbox.c
> > +++ b/drivers/mailbox/mtk-cmdq-mailbox.c
> > @@ -370,6 +370,8 @@ static void cmdq_remove(struct platform_device
> > *pdev)
> >   {
> >   	struct cmdq *cmdq = platform_get_drvdata(pdev);
> >   
> > +	devm_mbox_controller_unregister(&pdev->dev, &cmdq->mbox);
> 
> ...if you moved devm_mbox_controller_register() after
> devm_pm_runtime_enable(),
> this means that the teardown sequence will disable pm runtime after
> unregistering
> the mbox controller, so why do you need to call
> devm_mbox_controller_unregister()
> manually here?
> 

Since this is the first time I use b4 --manul-rerell to the v1 path, I
forgot to remove the change in v1.

I'll remove this and send v3 soon.

Regards,
Jason-JH.Lin


> Cheers,
> Angelo


More information about the Linux-mediatek mailing list