Re: [PATCH v3 06/15] platform: goldfish: pipe: Move memory allocation from probe to init

From: Greg KH
Date: Mon Oct 15 2018 - 14:35:03 EST


On Wed, Oct 03, 2018 at 10:17:11AM -0700, rkir@xxxxxxxxxx wrote:
> From: Roman Kiryanov <rkir@xxxxxxxxxx>
>
> There will be two separate init functions for v1 and v2
> (different driver versions) and they will allocate different
> state.

You should only allocate memory at probe time, not init time as what
happens if the hardware is not present yet your driver is loaded?

You should do almost nothing at init time except register with the
proper bus so that your probe function can be called if the hardware is
present.

So the patch here is going backwards from what it should be working
toward.

thanks,

greg k-h