Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Proposal for new frontend architecture



> > I've been implementing this suggestion. One reason I prefer having a flag
> > in the adapter (as opposed to i2c_add_adapter_noprobe()) is the following
> > situation:
> >
> > i2c_add_adapter_noprobe()
> > .... hardware communicates with EEPROM
> > .... in the meantime, another module is loaded which registers an
> > i2c_driver with the I2C_DF_NOTIFY flag set - this will attempt to register
> > this new driver with the the partially initialised adapter.
> > ....

Yep, for that a flag probably works better.

> However, I think I would prefer to be able to just say NOPROBE once and for 
> all and only have to worry about things registering themselves when I 
> specifically call i2c_adapter_probe_drivers().

i2c_adapter_probe_drivers() probably should (a) clear the NOPROBE flags
and (b) refuse to probe (again) if NOPROBE is already cleared (maybe
even BUG() on that).  That way the probing is really just delayed to
solve initialization order problems, any modules loaded after the
i2c_adapter_probe_drivers() call will still be probed.

If you don't want autoprobing you must never ever call
i2c_adapter_probe_drivers().  Do the probing exactly one when you'll
call i2c_adapter_probe_drivers() is silly and would introduce all kinds
of strange module load order bugs.  Don't even think about that.

i2c_adapter_enable_probing() would probably a better name to make clear
what it actually does.

  Gerd

-- 
return -ENOSIG;




Home | Main Index | Thread Index