Changeset 3356

Show
Ignore:
Timestamp:
09/01/99 21:02:55 (14 years ago)
Author:
kmalkki
Message:

(Kyösti)

  • Compiles again with kernels < 2.1.29
Files:
1 modified

Legend:

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

    r3355 r3356  
    199199                char name[8]; 
    200200                struct proc_dir_entry *proc_entry; 
     201#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,29)) 
     202                int res; 
     203#endif 
    201204 
    202205                sprintf(name,"i2c-%d", i); 
     
    280283                remove_proc_entry(name,proc_bus); 
    281284#else /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,29)) */ 
    282                 if (proc_entry) { 
     285                int res; 
     286                if (adapters[i]->proc_entry) { 
    283287                        if ((res = proc_unregister(&proc_bus_dir, 
    284288                                          adapters[i]->proc_entry->low_ino))) { 
    285289                                printk("i2c-core.o: Deregistration of /proc " 
    286                                        "entry failed\n" 
     290                                       "entry failed\n"); 
    287291                                return res; 
    288292                        } 
     
    578582#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,29)) 
    579583        struct proc_dir_entry *proc_bus_i2c; 
     584#else 
     585        int res; 
    580586#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,29)) */ 
    581587 
     
    629635                i2cproc_initialized -= 2; 
    630636#else /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,29)) */ 
     637                int res; 
    631638                if (i2cproc_initialized >= 2) { 
    632639                        if ((res = proc_unregister(&proc_bus_dir,