Hi,

The current method of parameter passing to drivers build as a module is 
extremely usefull.
Modules don't have to write there own parsing code, there's a nice macro that 
can be used to document specifics of the parameter and so on.

Could we extend this method where we use the same methodology for inbound 
drivers? (Currently a lot of drivers use their own parameter parsing code when 
it comes to passing values at kernel boot time.)

so we could do the regular:

        insmod mcd io=0x340

for modules, or with kernel boot parameters:

        mcd.io=0x340

for in-kernel drivers.


My proposal would be to introduce something like:

DRIVER_PARM_DESC(variable, description);
DRIVER_PARM(variable, type, scope);

    where scope can be:
        PARM_SCOPE_MODULE       => This parameter is used in module context.
        PARM_SCOPE_KERNEL       => This parameter is used in kernel context.
        PARM_SCOPE_MODULE | PARM_SCOPE_KERNEL
                                => This parameter is used in both kernel and 
module context, which should be the default if scope is omitted.


What do you think?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to