Show
Ignore:
Timestamp:
09/21/07 14:15:18 (7 years ago)
Author:
khali
Message:

Scan chip features only once at initialization time, rather than on
each update. The chip list and chip features do not change until
sensors_cleanup() is called, so there's no point in doing the
same work over and over again.

Files:
1 modified

Legend:

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

    r4693 r4828  
    117117loadLib 
    118118(void) { 
    119   return loadConfig (0); 
     119  int ret; 
     120  ret = loadConfig (0); 
     121  if (!ret) 
     122    ret = initKnownChips (); 
     123  return ret; 
    120124} 
    121125 
     
    123127reloadLib 
    124128(void) { 
    125   return loadConfig (1); 
     129  int ret; 
     130  freeKnownChips (); 
     131  ret = loadConfig (1); 
     132  if (!ret) 
     133    ret = initKnownChips (); 
     134  return ret; 
    126135} 
    127136 
     
    129138unloadLib 
    130139(void) { 
     140  freeKnownChips (); 
    131141  sensors_cleanup (); 
    132142  return 0;