Changeset 68
- Timestamp:
- 12/11/98 16:07:29 (10 years ago)
- Files:
-
- lm-sensors/trunk/kernel/busses/i2c-isa.c (modified) (3 diffs)
- lm-sensors/trunk/kernel/i2c-proc.c (modified) (5 diffs)
- lm-sensors/trunk/kernel/smbus.c (modified) (3 diffs)
- lm-sensors/trunk/src/i2c-proc.c (modified) (5 diffs)
- lm-sensors/trunk/src/isa.c (modified) (3 diffs)
- lm-sensors/trunk/src/smbus.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lm-sensors/trunk/kernel/busses/i2c-isa.c
r67 r68 80 80 "(no i2c level access possible!)\n", 81 81 adap->name); 82 #endif 82 83 return -1; 83 #endif84 84 } 85 85 … … 91 91 "(no i2c level access possible!)\n", 92 92 adap->name); 93 #endif 93 94 return -1; 94 #endif95 95 } 96 96 … … 102 102 "(no i2c level access possible!)\n", 103 103 adap->name); 104 #endif 104 105 return -1; 105 #endif106 106 } 107 107 lm-sensors/trunk/kernel/i2c-proc.c
r67 r68 157 157 } 158 158 proc_bus_i2c = create_proc_entry("i2c",0,proc_bus); 159 if (proc_bus_i2c) 160 proc_bus_i2c->read_proc = &read_bus_i2c; 161 else { 159 if (!proc_bus_i2c) { 162 160 printk("i2c-proc.o: Could not create /proc/bus/i2c, " 163 161 "module not inserted.\n"); … … 165 163 return -ENOENT; 166 164 } 165 proc_bus_i2c->read_proc = &read_bus_i2c; 166 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,29)) 167 proc_bus_i2c->fill_inode = &monitor_bus_i2c; 168 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,29)) */ 167 169 i2cproc_initialized += 2; 168 170 #else /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,29)) */ … … 253 255 for (i = 0; i < I2C_ADAP_MAX; i++) 254 256 if (i2cproc_adapters[i]) 255 len += sprintf(buf+len, "i2c-%d\t%s\t%-32s\t%-32s\n",i, 257 len += sprintf(buf+len, "i2c-%d\t%s\t%-32s\t%-32s\n", 258 i2c_adapter_id(i2cproc_adapters[i]), 256 259 i2c_is_smbus_adapter(i2cproc_adapters[i])?"smbus": 257 260 #ifdef DEBUG … … 357 360 i2cproc_adapters[i] = adapter; 358 361 359 sprintf(name,"i2c-%d",i );362 sprintf(name,"i2c-%d",i2c_adapter_id(adapter)); 360 363 361 364 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,29)) … … 414 417 if (client->adapter == i2cproc_adapters[i]) { 415 418 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,29)) 416 sprintf(name,"i2c-%d",i );419 sprintf(name,"i2c-%d",i2c_adapter_id(i2cproc_adapters[i])); 417 420 remove_proc_entry(name,proc_bus); 418 421 #else /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,29)) */ lm-sensors/trunk/kernel/smbus.c
r67 r68 192 192 "(no i2c level access possible!)\n", 193 193 adap->name); 194 #endif 194 195 return -1; 195 #endif196 196 } 197 197 … … 203 203 "(no i2c level access possible!)\n", 204 204 adap->name); 205 #endif 205 206 return -1; 206 #endif207 207 } 208 208 … … 214 214 "(no i2c level access possible!)\n", 215 215 adap->name); 216 #endif 216 217 return -1; 217 #endif218 218 } 219 219 lm-sensors/trunk/src/i2c-proc.c
r67 r68 157 157 } 158 158 proc_bus_i2c = create_proc_entry("i2c",0,proc_bus); 159 if (proc_bus_i2c) 160 proc_bus_i2c->read_proc = &read_bus_i2c; 161 else { 159 if (!proc_bus_i2c) { 162 160 printk("i2c-proc.o: Could not create /proc/bus/i2c, " 163 161 "module not inserted.\n"); … … 165 163 return -ENOENT; 166 164 } 165 proc_bus_i2c->read_proc = &read_bus_i2c; 166 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,29)) 167 proc_bus_i2c->fill_inode = &monitor_bus_i2c; 168 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,29)) */ 167 169 i2cproc_initialized += 2; 168 170 #else /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,29)) */ … … 253 255 for (i = 0; i < I2C_ADAP_MAX; i++) 254 256 if (i2cproc_adapters[i]) 255 len += sprintf(buf+len, "i2c-%d\t%s\t%-32s\t%-32s\n",i, 257 len += sprintf(buf+len, "i2c-%d\t%s\t%-32s\t%-32s\n", 258 i2c_adapter_id(i2cproc_adapters[i]), 256 259 i2c_is_smbus_adapter(i2cproc_adapters[i])?"smbus": 257 260 #ifdef DEBUG … … 357 360 i2cproc_adapters[i] = adapter; 358 361 359 sprintf(name,"i2c-%d",i );362 sprintf(name,"i2c-%d",i2c_adapter_id(adapter)); 360 363 361 364 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,29)) … … 414 417 if (client->adapter == i2cproc_adapters[i]) { 415 418 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,29)) 416 sprintf(name,"i2c-%d",i );419 sprintf(name,"i2c-%d",i2c_adapter_id(i2cproc_adapters[i])); 417 420 remove_proc_entry(name,proc_bus); 418 421 #else /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,29)) */ lm-sensors/trunk/src/isa.c
r67 r68 80 80 "(no i2c level access possible!)\n", 81 81 adap->name); 82 #endif 82 83 return -1; 83 #endif84 84 } 85 85 … … 91 91 "(no i2c level access possible!)\n", 92 92 adap->name); 93 #endif 93 94 return -1; 94 #endif95 95 } 96 96 … … 102 102 "(no i2c level access possible!)\n", 103 103 adap->name); 104 #endif 104 105 return -1; 105 #endif106 106 } 107 107 lm-sensors/trunk/src/smbus.c
r67 r68 192 192 "(no i2c level access possible!)\n", 193 193 adap->name); 194 #endif 194 195 return -1; 195 #endif196 196 } 197 197 … … 203 203 "(no i2c level access possible!)\n", 204 204 adap->name); 205 #endif 205 206 return -1; 206 #endif207 207 } 208 208 … … 214 214 "(no i2c level access possible!)\n", 215 215 adap->name); 216 #endif 216 217 return -1; 217 #endif218 218 } 219 219
