Re: request_firmware() hotplug interface, third round.

Manuel Estrada Sainz (ranty@debian.org)
Sat, 17 May 2003 16:57:30 +0200


On Sat, May 17, 2003 at 02:23:32PM +0100, Alan Cox wrote:
[snip]
> > No, still no good. It means that you get a memory leak if you unload
> > a driver before firmware is provided. You need the ability to explicitely
> > cancel a request for firmware.
>
> Only if you program it wrongly. Its not exactly hard.
>
> As to an interface. The simplest is probably
>
> request_firmware()
> and
> request_firmware_nowait(......, workqueuehandler)

This is what I plan to use:

int request_firmware_nowait (
struct module *module,
const char *name, const char *device, void *context,
void (*cont)(const struct firmware *fw, void *context));

Working code should be available later today.

> The issues brought up about it failing appear bogus too, if the hotplug
> run returns a non zero exit code you know about this already.

In this case, hotplug gets called automatically by the device model, and
there is no way to get the return value of the hotplug run.

If I get any good feedback on it, I'll try to make that return value
available, in the mean while, I already implemented a timeout.

Have a nice day

Manuel

-- 
--- Manuel Estrada Sainz <ranty@debian.org>
                         <ranty@bigfoot.com>
			 <ranty@users.sourceforge.net>
------------------------ <manuel.estrada@hispalinux.es> -------------------
Let us have the serenity to accept the things we cannot change, courage to
change the things we can, and wisdom to know the difference.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/