Changeset 3487

Show
Ignore:
Timestamp:
07/26/00 01:52:17 (13 years ago)
Author:
frodo
Message:

Sync with kernel 2.4.0-test5-pre4

Location:
i2c/trunk/kernel
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • i2c/trunk/kernel/i2c-dev.c

    r3476 r3487  
    3333#include <linux/malloc.h> 
    3434#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) */ 
    3538 
    3639/* If you want debugging uncomment: */ 
     
    7780 
    7881static 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) */ 
    7985        llseek:         i2cdev_lseek, 
    8086        read:           i2cdev_read, 
     
    375381        if (i2cdev_adaps[minor]->inc_use) 
    376382                i2cdev_adaps[minor]->inc_use(i2cdev_adaps[minor]); 
     383#if LINUX_KERNEL_VERSION < KERNEL_VERSION(2,4,0) 
    377384        MOD_INC_USE_COUNT; 
     385#endif /* LINUX_KERNEL_VERSION < KERNEL_VERSION(2,4,0) */ 
    378386 
    379387#ifdef DEBUG 
     
    391399        printk("i2c-dev.o: Closed: i2c-%d\n", minor); 
    392400#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) */ 
    394406        if (i2cdev_adaps[minor]->dec_use) 
    395407                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) */ 
    396411        return 0; 
    397412} 
  • i2c/trunk/kernel/i2c-elektor.c

    r3465 r3487  
    232232}; 
    233233 
    234 static int __init i2c_pcfisa_init(void)  
     234int __init i2c_pcfisa_init(void)  
    235235{ 
    236236