Messages in this thread | | | Date | Mon, 15 Oct 2018 20:34:58 +0200 | From | Greg KH <> | Subject | Re: [PATCH v3 06/15] platform: goldfish: pipe: Move memory allocation from probe to init |
| |
On Wed, Oct 03, 2018 at 10:17:11AM -0700, rkir@google.com wrote: > From: Roman Kiryanov <rkir@google.com> > > 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
| |