Changeset 3487
- Timestamp:
- 07/26/00 01:52:17 (13 years ago)
- Location:
- i2c/trunk/kernel
- Files:
-
- 2 modified
-
i2c-dev.c (modified) (4 diffs)
-
i2c-elektor.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
i2c/trunk/kernel/i2c-dev.c
r3476 r3487 33 33 #include <linux/malloc.h> 34 34 #include <linux/version.h> 35 #if LINUX_KERNEL_VERSION >= KERNEL_VERSION(2,4,0) 36 #include <linux/smp_lock.h> 37 #endif /* LINUX_KERNEL_VERSION >= KERNEL_VERSION(2,4,0) */ 35 38 36 39 /* If you want debugging uncomment: */ … … 77 80 78 81 static struct file_operations i2cdev_fops = { 82 #if LINUX_KERNEL_VERSION >= KERNEL_VERSION(2,4,0) 83 owner: THIS_MODULE, 84 #endif /* LINUX_KERNEL_VERSION >= KERNEL_VERSION(2,4,0) */ 79 85 llseek: i2cdev_lseek, 80 86 read: i2cdev_read, … … 375 381 if (i2cdev_adaps[minor]->inc_use) 376 382 i2cdev_adaps[minor]->inc_use(i2cdev_adaps[minor]); 383 #if LINUX_KERNEL_VERSION < KERNEL_VERSION(2,4,0) 377 384 MOD_INC_USE_COUNT; 385 #endif /* LINUX_KERNEL_VERSION < KERNEL_VERSION(2,4,0) */ 378 386 379 387 #ifdef DEBUG … … 391 399 printk("i2c-dev.o: Closed: i2c-%d\n", minor); 392 400 #endif 393 MOD_DEC_USE_COUNT; 401 #if LINUX_KERNEL_VERSION < KERNEL_VERSION(2,4,0) 402 MOD_INC_USE_COUNT; 403 #else /* LINUX_KERNEL_VERSION >= KERNEL_VERSION(2,4,0) */ 404 lock_kernel(); 405 #endif /* LINUX_KERNEL_VERSION < KERNEL_VERSION(2,4,0) */ 394 406 if (i2cdev_adaps[minor]->dec_use) 395 407 i2cdev_adaps[minor]->dec_use(i2cdev_adaps[minor]); 408 #if LINUX_KERNEL_VERSION >= KERNEL_VERSION(2,4,0) 409 unlock_kernel(); 410 #endif /* LINUX_KERNEL_VERSION >= KERNEL_VERSION(2,4,0) */ 396 411 return 0; 397 412 } -
i2c/trunk/kernel/i2c-elektor.c
r3465 r3487 232 232 }; 233 233 234 staticint __init i2c_pcfisa_init(void)234 int __init i2c_pcfisa_init(void) 235 235 { 236 236
