Changeset 42

Show
Ignore:
Timestamp:
12/06/98 17:19:24 (15 years ago)
Author:
frodo
Message:

Better header files

* Header files isa.h, sensors.h and smbus.h will now be installed on a

'make install';

* #ifdef KERNEL added to the above header files where appropriate;
* Correct files are included, both if KERNEL is true and false.

Location:
lm-sensors/trunk
Files:
9 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/kernel/Module.mk

    r29 r42  
    2727              $(MODULE_DIR)/i2c-proc.o $(MODULE_DIR)/lm75.o 
    2828 
    29 HEADERFILES := $(MODULE_DIR)/sensors.h  
     29HEADERFILES := $(MODULE_DIR)/sensors.h $(MODULE_DIR)/isa.h \ 
     30               $(MODULE_DIR)/smbus.h 
    3031 
    3132# Include all dependency files 
  • lm-sensors/trunk/kernel/include/i2c-isa.h

    r13 r42  
    2121#define SENSORS_SENSOR_H 
    2222 
     23#ifdef __KERNEL__ 
     24 
    2325/* This file must interface with Simon Vogl's i2c driver. Version 19981006 is 
    2426   OK, earlier versions are not; later versions will probably give problems 
    2527   too.  
    2628*/ 
    27 #ifdef I2C 
    28 #include "i2c/i2c.h" 
    29 #else /* def I2C */ 
    30 #include <linux/i2c.h> 
    31 #endif /* def I2C */ 
    32  
    3329#include <asm/types.h> 
    3430 
     
    4036#endif 
    4137 
    42 #include "isa.h" 
     38#ifdef LM_SENSORS 
     39#include "i2c.h" 
     40#else /* ndef LM_SENSORS */ 
     41#include <linux/i2c.h> 
     42#endif /* def LM_SENSORS */ 
    4343 
    4444/* Note that this driver is *not* built upon smbus.c, but is parallel to it. 
     
    118118}; 
    119119 
    120 /* We need to mark ISA algorithms in the algorithm structure. */ 
    121 #define ALGO_ISA 0x50000 
    122  
    123 /* ISA Adapter ids */ 
    124 #define ISA_MAIN 1 
    125120 
    126121/* Detect whether we are on the isa bus. If this returns true, all i2c 
     
    152147        i2c_detach_client((struct i2c_client *) (clientptr)) 
    153148 
     149#endif /* def __KERNEL__ */ 
     150 
     151/* We need to mark ISA algorithms in the algorithm structure. */ 
     152#define ALGO_ISA 0x50000 
     153 
     154/* ISA Adapter ids */ 
     155#define ISA_MAIN 1 
    154156 
    155157#endif /* ndef SENSORS_ISA_H */ 
  • lm-sensors/trunk/kernel/include/isa.h

    r13 r42  
    2121#define SENSORS_SENSOR_H 
    2222 
     23#ifdef __KERNEL__ 
     24 
    2325/* This file must interface with Simon Vogl's i2c driver. Version 19981006 is 
    2426   OK, earlier versions are not; later versions will probably give problems 
    2527   too.  
    2628*/ 
    27 #ifdef I2C 
    28 #include "i2c/i2c.h" 
    29 #else /* def I2C */ 
    30 #include <linux/i2c.h> 
    31 #endif /* def I2C */ 
    32  
    3329#include <asm/types.h> 
    3430 
     
    4036#endif 
    4137 
    42 #include "isa.h" 
     38#ifdef LM_SENSORS 
     39#include "i2c.h" 
     40#else /* ndef LM_SENSORS */ 
     41#include <linux/i2c.h> 
     42#endif /* def LM_SENSORS */ 
    4343 
    4444/* Note that this driver is *not* built upon smbus.c, but is parallel to it. 
     
    118118}; 
    119119 
    120 /* We need to mark ISA algorithms in the algorithm structure. */ 
    121 #define ALGO_ISA 0x50000 
    122  
    123 /* ISA Adapter ids */ 
    124 #define ISA_MAIN 1 
    125120 
    126121/* Detect whether we are on the isa bus. If this returns true, all i2c 
     
    152147        i2c_detach_client((struct i2c_client *) (clientptr)) 
    153148 
     149#endif /* def __KERNEL__ */ 
     150 
     151/* We need to mark ISA algorithms in the algorithm structure. */ 
     152#define ALGO_ISA 0x50000 
     153 
     154/* ISA Adapter ids */ 
     155#define ISA_MAIN 1 
    154156 
    155157#endif /* ndef SENSORS_ISA_H */ 
  • lm-sensors/trunk/kernel/include/sensors.h

    r29 r42  
    2121#define SENSORS_SENSORS_H 
    2222 
     23#ifdef __KERNEL__ 
     24 
    2325/* Next two must be included before sysctl.h can be included, in 2.0 kernels */ 
    2426#include <linux/types.h> 
    2527#include <linux/fs.h> 
    2628#include <linux/sysctl.h> 
    27  
    28 #ifdef __KERNEL__ 
    2929 
    3030/* The type of callback functions used in sensors_{proc,sysctl}_real */ 
  • lm-sensors/trunk/kernel/include/smbus.h

    r34 r42  
    2727   too.  
    2828*/ 
    29 #include "i2c.h" 
    3029#include <asm/types.h> 
    3130 
     
    3534#else 
    3635#include <asm/semaphore.h> 
     36#endif 
     37 
     38#ifdef LM_SENSORS 
     39#include "i2c.h" 
     40#else 
     41#include <linux/i2c.h> 
    3742#endif 
    3843 
  • lm-sensors/trunk/src/Module.mk

    r29 r42  
    2727              $(MODULE_DIR)/i2c-proc.o $(MODULE_DIR)/lm75.o 
    2828 
    29 HEADERFILES := $(MODULE_DIR)/sensors.h  
     29HEADERFILES := $(MODULE_DIR)/sensors.h $(MODULE_DIR)/isa.h \ 
     30               $(MODULE_DIR)/smbus.h 
    3031 
    3132# Include all dependency files 
  • lm-sensors/trunk/src/isa.h

    r13 r42  
    2121#define SENSORS_SENSOR_H 
    2222 
     23#ifdef __KERNEL__ 
     24 
    2325/* This file must interface with Simon Vogl's i2c driver. Version 19981006 is 
    2426   OK, earlier versions are not; later versions will probably give problems 
    2527   too.  
    2628*/ 
    27 #ifdef I2C 
    28 #include "i2c/i2c.h" 
    29 #else /* def I2C */ 
    30 #include <linux/i2c.h> 
    31 #endif /* def I2C */ 
    32  
    3329#include <asm/types.h> 
    3430 
     
    4036#endif 
    4137 
    42 #include "isa.h" 
     38#ifdef LM_SENSORS 
     39#include "i2c.h" 
     40#else /* ndef LM_SENSORS */ 
     41#include <linux/i2c.h> 
     42#endif /* def LM_SENSORS */ 
    4343 
    4444/* Note that this driver is *not* built upon smbus.c, but is parallel to it. 
     
    118118}; 
    119119 
    120 /* We need to mark ISA algorithms in the algorithm structure. */ 
    121 #define ALGO_ISA 0x50000 
    122  
    123 /* ISA Adapter ids */ 
    124 #define ISA_MAIN 1 
    125120 
    126121/* Detect whether we are on the isa bus. If this returns true, all i2c 
     
    152147        i2c_detach_client((struct i2c_client *) (clientptr)) 
    153148 
     149#endif /* def __KERNEL__ */ 
     150 
     151/* We need to mark ISA algorithms in the algorithm structure. */ 
     152#define ALGO_ISA 0x50000 
     153 
     154/* ISA Adapter ids */ 
     155#define ISA_MAIN 1 
    154156 
    155157#endif /* ndef SENSORS_ISA_H */ 
  • lm-sensors/trunk/src/sensors.h

    r29 r42  
    2121#define SENSORS_SENSORS_H 
    2222 
     23#ifdef __KERNEL__ 
     24 
    2325/* Next two must be included before sysctl.h can be included, in 2.0 kernels */ 
    2426#include <linux/types.h> 
    2527#include <linux/fs.h> 
    2628#include <linux/sysctl.h> 
    27  
    28 #ifdef __KERNEL__ 
    2929 
    3030/* The type of callback functions used in sensors_{proc,sysctl}_real */ 
  • lm-sensors/trunk/src/smbus.h

    r34 r42  
    2727   too.  
    2828*/ 
    29 #include "i2c.h" 
    3029#include <asm/types.h> 
    3130 
     
    3534#else 
    3635#include <asm/semaphore.h> 
     36#endif 
     37 
     38#ifdef LM_SENSORS 
     39#include "i2c.h" 
     40#else 
     41#include <linux/i2c.h> 
    3742#endif 
    3843