Possible bug in i2c_register_entry ?

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

 



> I stumbled upon a possible bug in i2c_register_entry() (file
> i2c-proc.c).
> 
> 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
procfs.

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.

-- 
Jean Delvare
http://khali.linux-fr.org/



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux