Changeset 3411
- Timestamp:
- 11/30/99 21:06:42 (13 years ago)
- Location:
- i2c/trunk/kernel
- Files:
-
- 2 modified
-
i2c-core.c (modified) (4 diffs)
-
i2c-elektor.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
i2c/trunk/kernel/i2c-core.c
r3407 r3411 113 113 static int i2cproc_cleanup(void); 114 114 115 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) 115 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) && \ 116 (LINUX_VERSION_CODE <= KERNEL_VERSION(2,3,27)) 116 117 static void monitor_bus_i2c(struct inode *inode, int fill); 117 118 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) */ … … 236 237 } 237 238 proc_entry->ops = &i2cproc_inode_operations; 238 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) 239 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,27)) 240 proc_entry->owner = THIS_MODULE; 241 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) 239 242 proc_entry->fill_inode = &monitor_bus_i2c; 240 243 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) */ … … 530 533 #ifdef CONFIG_PROC_FS 531 534 532 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) 535 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) && \ 536 (LINUX_VERSION_CODE <= KERNEL_VERSION(2,3,27)) 533 537 /* Monitor access to /proc/bus/i2c*; make unloading i2c-proc impossible 534 538 if some process still uses it or some file in it */ … … 641 645 } 642 646 proc_bus_i2c->read_proc = &read_bus_i2c; 643 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) 647 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,27)) 648 proc_bus_i2c->owner = THIS_MODULE; 649 #elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) 644 650 proc_bus_i2c->fill_inode = &monitor_bus_i2c; 645 651 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,29)) */ -
i2c/trunk/kernel/i2c-elektor.c
r3396 r3411 63 63 static int i2c_debug=0; 64 64 static struct i2c_pcf_isa gpi; 65 #if (LINUX_VERSION_CODE < 0x020301) 65 66 static struct wait_queue *pcf_wait = NULL; 67 #else 68 static wait_queue_head_t pcf_wait; 69 #endif 66 70 static int pcf_pending; 67 68 71 69 72 /* ----- global defines ----------------------------------------------- */ … … 282 285 283 286 pcf_isa_data.data = (void *)pisa; 287 #if (LINUX_VERSION_CODE >= 0x020301) 288 init_waitqueue_head(&pcf_wait); 289 #endif 284 290 if (pcf_isa_init() == 0) { 285 291 if (i2c_pcf_add_bus(&pcf_isa_ops) < 0)
