Changeset 4167

Show
Ignore:
Timestamp:
09/21/06 20:55:43 (7 years ago)
Author:
khali
Message:

Do not assume that every i2c chip at 0x50 is handled by the eeprom
driver. Some are handled by the tveeprom driver, which doesn't create
the eeprom interface file. So we must really test for the eeprom file,
and not the device directory.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/prog/eeprom/ddcmon

    r2824 r4167  
    440440        my $bytes; 
    441441 
    442         if (-r "/sys/bus/i2c/devices/$bus-00$address") 
     442        if (-r "/sys/bus/i2c/devices/$bus-00$address/eeprom") 
    443443        { 
    444444                $bytes = get_edid_sysfs($bus, $address); 
    445445        } 
    446         elsif (-r "/proc/sys/dev/sensors/eeprom-i2c-$bus-$address") 
     446        elsif (-r "/proc/sys/dev/sensors/eeprom-i2c-$bus-$address/00") 
    447447        { 
    448448                $bytes = get_edid_procfs($bus, $address);