Changeset 147

Show
Ignore:
Timestamp:
01/07/99 21:07:15 (14 years ago)
Author:
frodo
Message:

i2c-proc bug resolved

Location:
lm-sensors/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/CHANGES

    r146 r147  
    1414      cvs diff -r V2-0-0 -r V2-0-1 -u 
    1515 
     162.1.1 (19990107) 
     17  Module i2c-proc.o: Hack to make /proc/bus/ possible for kernels 2.0.35 
     18                     and older 
     19  Module gl518sm.o: Miscelaneous bugs and problems solved 
    1620 
    17212.1.0 (19981230) 
  • lm-sensors/trunk/kernel/i2c-proc.c

    r96 r147  
    7171    /* gid */           0, 
    7272    /* size */          0, 
    73     /* ops */           &proc_dir_inode_operations, 
     73#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,36)) 
     74    /* ops */           &proc_dir_inode_operations,  
     75#endif 
    7476  }; 
    7577 
     
    171173#else /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,29)) */ 
    172174  /* In Linux 2.0.x, there is no /proc/bus! But I hope no other module 
    173      introduced it, or we are fucked. */ 
     175     introduced it, or we are fucked. And 2.0.35 and earlier does not 
     176     export proc_dir_inode_operations, so we grab it from proc_net, 
     177     which also uses it. Not nice. */ 
     178/* #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,0,36) */ 
     179  proc_bus_dir.ops = proc_net.ops; 
     180/* #endif */ 
    174181  if ((res = proc_register_dynamic(&proc_root, &proc_bus_dir))) { 
    175182    printk("i2c-proc.o: Could not create /proc/bus/, module not inserted.\n"); 
  • lm-sensors/trunk/src/i2c-proc.c

    r96 r147  
    7171    /* gid */           0, 
    7272    /* size */          0, 
    73     /* ops */           &proc_dir_inode_operations, 
     73#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,36)) 
     74    /* ops */           &proc_dir_inode_operations,  
     75#endif 
    7476  }; 
    7577 
     
    171173#else /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,29)) */ 
    172174  /* In Linux 2.0.x, there is no /proc/bus! But I hope no other module 
    173      introduced it, or we are fucked. */ 
     175     introduced it, or we are fucked. And 2.0.35 and earlier does not 
     176     export proc_dir_inode_operations, so we grab it from proc_net, 
     177     which also uses it. Not nice. */ 
     178/* #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,0,36) */ 
     179  proc_bus_dir.ops = proc_net.ops; 
     180/* #endif */ 
    174181  if ((res = proc_register_dynamic(&proc_root, &proc_bus_dir))) { 
    175182    printk("i2c-proc.o: Could not create /proc/bus/, module not inserted.\n");