Changeset 4674

Show
Ignore:
Timestamp:
08/16/07 11:57:56 (7 years ago)
Author:
khali
Message:

Don't handle the isa bus in sensors_parse_i2cbus_name(). We really
don't need to, as there is a single ISA bus, there's no need for
substituting anything.

Location:
lm-sensors/branches/lm-sensors-3.0.0/lib
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/lib/data.c

    r4673 r4674  
    191191  int i; 
    192192 
    193   if (! strcmp(name,"isa")) { 
    194     *res = SENSORS_CHIP_NAME_BUS_ISA; 
    195     return 0; 
    196   } 
    197193  if (strncmp(name,"i2c-",4)) { 
    198194    return -SENSORS_ERR_BUS_NAME; 
  • lm-sensors/branches/lm-sensors-3.0.0/lib/sysfs.c

    r4673 r4674  
    375375                        continue; 
    376376 
     377                if (sscanf(clsdev->name, "i2c-%d", &entry.number) != 1 || 
     378                    entry.number == 9191) /* legacy ISA */ 
     379                        continue; 
     380 
    377381                /* NB: attr->value[attr->len-1] == '\n'; chop that off */ 
    378382                entry.adapter = strndup(attr->value, attr->len - 1); 
    379383                if (!entry.adapter) 
    380384                        sensors_fatal_error(__FUNCTION__, "out of memory"); 
    381  
    382                 if (!strncmp(entry.adapter, "ISA ", 4)) { 
    383                         entry.number = SENSORS_CHIP_NAME_BUS_ISA; 
    384                 } else if (sscanf(clsdev->name, "i2c-%d", &entry.number) != 1) { 
    385                         continue; 
    386                 } 
    387385 
    388386                sensors_add_proc_bus(&entry);