Possible bug in i2c_register_entry ?
khali at linux-fr.org
Tue Sep 28 23:19:14 CEST 2004
> I stumbled upon a possible bug in i2c_register_entry() (file
> The function counts the number if sysctl entries by looking at
> i2c_client.procname . My sensor module needs to register sysctls that
> are not visible through proc, so their procname entry is NULL.
> My question is: shouldn't i2c_register_entry() rely on
> i2c_client.ctl_name for counting the number of entries ?
As strange as it may sound if you consider the age of the code, I
believe that you are right and we should rely on ctl_name instead of
procname. It has gone unnoticed so far most probably because all
hardware monitoring device drivers export all their sysctl entries to
I will fix that in CVS, and send a similar fix to Marcelo Tosatti for
Linux 2.4, although I'm not sure he will accept it. The fix doesn't
apply to 2.6 since we are using sysfs instead of procfs now.
BTW, for which device are you writing a driver?
Thanks for reporting.
More information about the lm-sensors