Linux-kernel mailing list archive 2000-04,: init_module() knowing probe parameters

# init_module() knowing probe parameters

David Schleef (ds@stm.lbl.gov)
Thu, 27 Jan 2000 22:08:43 -0800

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Larry McVoy: "Re: Auto-Adaptive scheduler - Final chapter ( the numbers ) ..."
- Previous message: Andre Hedrick: "Re: IDE problem with 2.3.39pre2-2.3.41pre3 on Athlon system"
- Next in thread: Keith Owens: "Re: init_module() knowing probe parameters"
- Reply: Keith Owens: "Re: init_module() knowing probe parameters"

Is there an existing method for a module to discover the request_module()
parameter that triggered its loading? I currently planning to use a
variable called request_module_minor in the interface module, which holds
the minor number of the most recently requested minor number. That way,
when init_module() calls comedi_driver_register(&this_driver),[1] the
function will return a minor number if it is supposed to go ahead and
attach itself. (Currently, they don't auto-attach.) Obviously, this
is a race condition waiting to happen.

An alternative that I've considered is to use something similar to the
following in /etc/conf.modules:

alias char-major-98-2 whatever
options whatever minor=2

I've noticed that many of the current interfaces don't necessarily
match up request_module("char-major-A-B") or request_module("ethN")
with the actual device A,B. This may not be too much of an issue for
interfaces that have, on average, one device, but I have several users
that have 3-4 devices, and I've been developing virtual device drivers
that could take up many more slots. You wouldn't want to modprobe a
direct digital synthesizer module, but get a demodulator, would you?

Is there any need for a kernel-wide solution to this, or does nobody
really care?

dave...

[1] Control and Measurement Device Interface, http://stm.lbl.gov/comedi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

- Next message: Larry McVoy: "Re: Auto-Adaptive scheduler - Final chapter ( the numbers ) ..."
- Previous message: Andre Hedrick: "Re: IDE problem with 2.3.39pre2-2.3.41pre3 on Athlon system"
- Next in thread: Keith Owens: "Re: init_module() knowing probe parameters"
- Reply: Keith Owens: "Re: init_module() knowing probe parameters"