Show
Ignore:
Timestamp:
12/02/98 18:25:53 (14 years ago)
Author:
frodo
Message:

Fixes to make code compile with 2.1 kernels

Everything now compiles cleanly (except for warnings in kernel header files)
against 2.1.122. As I do not run 2.1 kernels, loading them could not be
tested.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/kernel/compat.h

    r19 r22  
    3838#endif /* def MODULE */ 
    3939 
    40 /* copy_from/to_usr is called memcpy_from/to_fs in 2.0 kernels; perhaps in 
    41    some early 2.1 kernels too? */ 
     40/* copy_from/to_usr is called memcpy_from/to_fs in 2.0 kernels  
     41   get_user was redefined in 2.1 kernels to use two arguments, and returns 
     42   an error code */ 
    4243#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,4)) 
    4344#define copy_from_user memcpy_fromfs 
    4445#define copy_to_user memcpy_tofs 
    45 #endif 
    46  
    47 /* get_user was redefined in 2.1 kernels to use two arguments, and returns 
    48    an error code */ 
    49 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,4)) 
    5046#define get_user_data(to,from) ((to) = get_user(from),0) 
    5147#else 
     48#include <asm/uaccess.h> 
    5249#define get_user_data(to,from) get_user(to,from) 
    5350#endif