Re: [PATCH 2/3] Add platform_device_register_simple

Russell King
2004-06-10T13:56:40Z

On Thu, Jun 10, 2004 at 07:55:59AM -0500, Dmitry Torokhov wrote:
> On Thursday 10 June 2004 05:16 am, Russell King wrote:
> >
> > As this currently stands, you have no chance to add resources to the
> > platform device before it's made available to the driver. It's likely
> > that any attached resources will have the same lifetime as the
> > device itself, so it makes sense to allocate them together with the
> > platform device.
> >
>
> Are you suggesting adding pointer to resources as a 3rd argument and
> automotically release it for the user? It probably could be done but users
> will be tempted to use static module data and bad things would happen.

Please read my second sentence again. It implies a copy of the resources
is kept with the platform device, so both have the same lifetime.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core