mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-03 13:38:25 +00:00
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. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@42 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
831b8e88f3
commit
f322a67793
9 files changed
+62
-44
No files matched your search
+14
-12
@@ -20,16 +20,12 @@
|
||||
#ifndef SENSORS_SENSOR_H
|
||||
#define SENSORS_SENSOR_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* This file must interface with Simon Vogl's i2c driver. Version 19981006 is
|
||||
OK, earlier versions are not; later versions will probably give problems
|
||||
too.
|
||||
*/
|
||||
#ifdef I2C
|
||||
#include "i2c/i2c.h"
|
||||
#else /* def I2C */
|
||||
#include <linux/i2c.h>
|
||||
#endif /* def I2C */
|
||||
|
||||
#include <asm/types.h>
|
||||
|
||||
/* SPINLOCK is defined in i2c.h. */
|
||||
@@ -39,7 +35,11 @@
|
||||
#include <asm/semaphore.h>
|
||||
#endif
|
||||
|
||||
#include "isa.h"
|
||||
#ifdef LM_SENSORS
|
||||
#include "i2c.h"
|
||||
#else /* ndef LM_SENSORS */
|
||||
#include <linux/i2c.h>
|
||||
#endif /* def LM_SENSORS */
|
||||
|
||||
/* Note that this driver is *not* built upon smbus.c, but is parallel to it.
|
||||
We do not need SMBus facilities if we are on the ISA bus, after all */
|
||||
@@ -117,11 +117,6 @@ struct isa_adapter {
|
||||
int retries;
|
||||
};
|
||||
|
||||
/* We need to mark ISA algorithms in the algorithm structure. */
|
||||
#define ALGO_ISA 0x50000
|
||||
|
||||
/* ISA Adapter ids */
|
||||
#define ISA_MAIN 1
|
||||
|
||||
/* Detect whether we are on the isa bus. If this returns true, all i2c
|
||||
access will fail! */
|
||||
@@ -151,5 +146,12 @@ struct isa_adapter {
|
||||
#define isa_detach_client(clientptr) \
|
||||
i2c_detach_client((struct i2c_client *) (clientptr))
|
||||
|
||||
#endif /* def __KERNEL__ */
|
||||
|
||||
/* We need to mark ISA algorithms in the algorithm structure. */
|
||||
#define ALGO_ISA 0x50000
|
||||
|
||||
/* ISA Adapter ids */
|
||||
#define ISA_MAIN 1
|
||||
|
||||
#endif /* ndef SENSORS_ISA_H */
|
||||
+14
-12
@@ -20,16 +20,12 @@
|
||||
#ifndef SENSORS_SENSOR_H
|
||||
#define SENSORS_SENSOR_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* This file must interface with Simon Vogl's i2c driver. Version 19981006 is
|
||||
OK, earlier versions are not; later versions will probably give problems
|
||||
too.
|
||||
*/
|
||||
#ifdef I2C
|
||||
#include "i2c/i2c.h"
|
||||
#else /* def I2C */
|
||||
#include <linux/i2c.h>
|
||||
#endif /* def I2C */
|
||||
|
||||
#include <asm/types.h>
|
||||
|
||||
/* SPINLOCK is defined in i2c.h. */
|
||||
@@ -39,7 +35,11 @@
|
||||
#include <asm/semaphore.h>
|
||||
#endif
|
||||
|
||||
#include "isa.h"
|
||||
#ifdef LM_SENSORS
|
||||
#include "i2c.h"
|
||||
#else /* ndef LM_SENSORS */
|
||||
#include <linux/i2c.h>
|
||||
#endif /* def LM_SENSORS */
|
||||
|
||||
/* Note that this driver is *not* built upon smbus.c, but is parallel to it.
|
||||
We do not need SMBus facilities if we are on the ISA bus, after all */
|
||||
@@ -117,11 +117,6 @@ struct isa_adapter {
|
||||
int retries;
|
||||
};
|
||||
|
||||
/* We need to mark ISA algorithms in the algorithm structure. */
|
||||
#define ALGO_ISA 0x50000
|
||||
|
||||
/* ISA Adapter ids */
|
||||
#define ISA_MAIN 1
|
||||
|
||||
/* Detect whether we are on the isa bus. If this returns true, all i2c
|
||||
access will fail! */
|
||||
@@ -151,5 +146,12 @@ struct isa_adapter {
|
||||
#define isa_detach_client(clientptr) \
|
||||
i2c_detach_client((struct i2c_client *) (clientptr))
|
||||
|
||||
#endif /* def __KERNEL__ */
|
||||
|
||||
/* We need to mark ISA algorithms in the algorithm structure. */
|
||||
#define ALGO_ISA 0x50000
|
||||
|
||||
/* ISA Adapter ids */
|
||||
#define ISA_MAIN 1
|
||||
|
||||
#endif /* ndef SENSORS_ISA_H */
|
||||
@@ -20,13 +20,13 @@
|
||||
#ifndef SENSORS_SENSORS_H
|
||||
#define SENSORS_SENSORS_H
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* Next two must be included before sysctl.h can be included, in 2.0 kernels */
|
||||
#include <linux/types.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/sysctl.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
/* The type of callback functions used in sensors_{proc,sysctl}_real */
|
||||
typedef void (*sensors_real_callback) (struct i2c_client *client,
|
||||
int operation, int ctl_name,
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
OK, earlier versions are not; later versions will probably give problems
|
||||
too.
|
||||
*/
|
||||
#include "i2c.h"
|
||||
#include <asm/types.h>
|
||||
|
||||
/* SPINLOCK is defined in i2c.h. */
|
||||
@@ -36,6 +35,12 @@
|
||||
#include <asm/semaphore.h>
|
||||
#endif
|
||||
|
||||
#ifdef LM_SENSORS
|
||||
#include "i2c.h"
|
||||
#else
|
||||
#include <linux/i2c.h>
|
||||
#endif
|
||||
|
||||
/* Declarations, to keep the compiler happy */
|
||||
struct smbus_driver;
|
||||
struct smbus_client;
|
||||
|
||||
Reference in new issue
Block a user