RE: [PATCH] of/platform: increase refcount of fwnode
From: Peng Fan
Date: Thu Aug 17 2023 - 09:14:25 EST
> Subject: Re: [PATCH] of/platform: increase refcount of fwnode
>
> On Thu, Aug 17, 2023 at 01:57:39PM +0300, Andy Shevchenko wrote:
> > On Sat, Aug 12, 2023 at 08:24:11PM +0800, Peng Fan (OSS) wrote:
>
> ...
>
> > > - device_set_node(&dev->dev, of_fwnode_handle(node));
> > > + device_set_node(&dev->dev, fwnode_handle_get(fwnode));
> >
> > Ditto.
>
> Actually no, amba_device_alloc() does not use platform_device_alloc() and
> defines it's own .release method. There is no reference count drop there
> AFAICS.
My test only covers platform device, so ..
But I have a general question here. Since of_amba_device_create will use
the of_node or fwnode, shouldn't the refcount_t be increased and released
in amba device release?
Thanks,
Peng.
>
> --
> With Best Regards,
> Andy Shevchenko
>