Re: modprobe + request_module() deadlock

Johannes Stezenbach
2004-11-22T14:36:17Z

(someone dropped me off the Cc: list for this thread :-(, which is
doubly bad because I'm not subscribed to lkml :-(( )

Gerd Knorr wrote:
> > The traditional way to do this has been to have saa7134-empress do its
> > own probe, and likewise saa7134-dvb.
>
> They can't actually probe themself. It's _one_ PCI device (driven by
> the saa7134 module) which can handle (among other v4l-related things)
> the DMA transfer of mpeg streams. That can be used in different ways
> (or not at all) and the different use cases are handled by the
> sub-modules.
>
> So the way it is intended to work is that saa7134 has the pci table and
> gets autoloaded by hotplug, it will have a look at the hardware and then
> load either saa7134-empress or saa7134-dvb or none of them, so you'll
> get everything nicely autoloaded.

The saa7146 driver seems to have a working solution for this
problem: The PCI ids are registered to the subdrivers (e.g. dvb-ttpci
or mxb) so that these are loaded via hotplug. They then register to the
saa7146 core as an "extension" module, and the core then does the probing.
Grep for saa7146_register_extension().

Johannes