[BUG 2.6.36-rc5] of_i2c.ko <-> i2c-core.ko dependency loop

Grant Likely grant.likely at secretlab.ca
Sat Sep 25 08:14:44 EST 2010


On Fri, Sep 24, 2010 at 7:48 AM, Grant Likely <grant.likely at secretlab.ca> wrote:
>
>
> "Jean Delvare" <khali at linux-fr.org> wrote:
>
>>Hi Mikael,
>>
>>On Fri, 24 Sep 2010 12:50:01 +0200, Mikael Pettersson wrote:
>>> Jean Delvare writes:
>>>  > As far as I can see this is caused by this commit from Grant:
>>>  >
>>>  > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=959e85f7751c33d1a2dabc5cc3fe2ed0db7052e5
>>>  >
>>>  > Mikael, can you please try reverting this patch and see if it solves
>>>  > your problem?
>>>
>>> Yes, reverting the above commit from 2.6.36-rc5 eliminated the warnings,
>>> and I was able to insmod the i2c-{core,dev,powermac}.ko modules.
>>
>>Thanks for testing and reporting. Grant, unless you come up with a fix
>>very quickly, I'll have to revert
>>959e85f7751c33d1a2dabc5cc3fe2ed0db7052e5 for 2.6.36.
>
> I'll get a fix out today.

I've got two different fixes that I'm about to send you.  You can
choose the fix that you prefer.  The first option moves the offending
function into i2c-core.c.  The function parses the device tree data
and creates i2c_device for each i2c device node that it finds.  This
is analogous to i2c_scan_static_board_info().

The second options reverts most of the 959e85f7 commit, but keeps the
line that allows of-style matching is retained so that all i2c_devices
on powerpc machines will still bind correctly.

My preferred solution is the first option because the tested code path
does not changed.  The offending function is simply moved verbatim.
The second option is a smaller patch, but I can only test one of the
affected drivers.  However, I'll let you make the decision.

Both have been build tested on PowerPC and ARM, and run tested on a
PowerPC MPC5200 board.

patches to follow in a few minutes..

g.


More information about the Linuxppc-dev mailing list