Re: [PATCH] Module alias and table support

Adam J. Richter (adam@yggdrasil.com)
Mon, 25 Nov 2002 19:26:27 -0800


I really like Rusty's "module aliases" idea.

Its full potential has not been recognized in this discussion.

If we're going to use strings for device ID matching,
then we can consolidate all of the xxx_device_id types into one:

struct device_id {
const char *pattern;
/* In practice, many drivers want scalar driver data, many
want an integer, and a few could benefit from having both.
Alternatively, we could have no extra match data at all
and make drivers declare a parallel table, for it, but
most drivers only have a few ID's to match, so the cost of
providing these fields is small. */
int match_scalar;
void *match_ptr;
};

There would be a long period of backward compatability wrappers
and porting to use the interface directly, but eventually we would have:

- only one kind of module device table for generating module aliases,

- device ID matching consolidated into drivers/base,

- No need for user level programs to query devices to generate
hotplug information (goodbye pcimodules, usbmodules,
isapnpmodules),

- Zero changes to user or kernel needed to add a new hotplug
bus type (just drop the driver modules in /lib/modules/nnn/
and run depmod).

Adam J. Richter __ ______________ 575 Oroville Road
adam@yggdrasil.com \ / Milpitas, California 95035
+1 408 309-6081 | g g d r a s i l United States of America
"Free Software For The Rest Of Us."
-
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/