On Wednesday 24 September 2008, Jean Delvare wrote:
> Hi David,
> 
> On Tue, 23 Sep 2008 11:38:19 -0700, David Brownell wrote:
> > From: David Brownell <[EMAIL PROTECTED]>
> > 
> > Guard I2C against oopsing because of init sequence problems...
> > 
> > Alternatively have postcore_initcall(i2c_init), which may
> > be better ... the initcall levels are pretty limited, and
> > in these cases the "subsystem" of interest builds on I2C
> > and needs to work before device_initcall.  Having I2C use
> > subsys_initcall kind of forces things into fs_initcall.
> > 
> > I'd encourage the anti-oopsing paranoia in any case, even
> > if i2c switches to postcore_initcall (or earlier).
> 
> I'm confused. If i2c_register_adapter() is called before i2c_init(),
> your patch prevents an oops, but things will still not work, right?

And it warns about exactly where the problem came from,
because of the WARN_ON.  That addresses a long-standing
debuggability problem which has afflicted these issues.


> So 
> this doesn't seem to add much value. In any case we need to fix the
> init sequence, so let's just do that.

I'll send in a separate patch switching the driver model init
to a postcore_initcall() -- it's not arch-specific and there
seems no reason to have it earlier.

Semi-related:  that module init/exit code is at a wierd place,
in the middle of that file ... vs the conventional location at
the end.  OK to change that?  In the same patch, or separate?

- Dave


_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c

Reply via email to