Re: [PATCH v2 5/5] bus: hisi_lpc: Use platform_device_register_full()
From: Andy Shevchenko
Date: Fri Sep 02 2022 - 05:22:36 EST
On Fri, Sep 2, 2022 at 12:18 PM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
>
> On Fri, Sep 2, 2022 at 11:10 AM John Garry <john.garry@xxxxxxxxxx> wrote:
> >
> > The code to create the child platform device is essentially the same as
> > what platform_device_register_full() does, so change over to use
> > that same function to reduce duplication.
>
> Now statistics plays for you and not against.
> Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
Too fast to give a tag, see below (keep tag if addressing it)
...
> > - pdev = platform_device_alloc(cell->name, PLATFORM_DEVID_AUTO);
> > + pdev = platform_device_register_full(cell->pdevinfo);
> > if (!pdev)
> > return -ENOMEM;
As per kernel doc:
* Returns &struct platform_device pointer on success, or ERR_PTR() on error.
--
With Best Regards,
Andy Shevchenko