From 81dd46d1992d6241261d2d7db9864913561220ac Mon Sep 17 00:00:00 2001 From: Frodo Looijaard Date: Wed, 2 Dec 1998 17:43:13 +0000 Subject: [PATCH] Made sure the right i2c.h file was always included git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@23 7894878c-1315-0410-8ee3-d5d059ff63e0 --- Makefile | 2 +- kernel/include/i2c.h | 29 +++++++++++++++++++++++++++++ kernel/include/smbus.h | 7 +------ src/i2c.h | 29 +++++++++++++++++++++++++++++ src/smbus.h | 7 +------ 5 files changed, 61 insertions(+), 13 deletions(-) create mode 100644 kernel/include/i2c.h create mode 100644 src/i2c.h diff --git a/Makefile b/Makefile index 9fcbe83d..6e1620d8 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,7 @@ CC := gcc # CFLAGS is to create in-kernel object files (modules); EXCFLAGS is to create # non-kernel object files (which are linked into executables). CFLAGS := -D__KERNEL__ -DMODULE -I. -Ii2c -O2 -fomit-frame-pointer -DLM_SENSORS -EXCFLAGS := -I. -O2 -Ii2c -D LM_SENSORS +EXCFLAGS := -I. -Ii2c -O2 -D LM_SENSORS ifeq ($(DEBUG),1) CFLAGS += -DDEBUG diff --git a/kernel/include/i2c.h b/kernel/include/i2c.h new file mode 100644 index 00000000..b060d4e6 --- /dev/null +++ b/kernel/include/i2c.h @@ -0,0 +1,29 @@ +/* + i2c.h - A Linux module for reading sensor data. + Copyright (c) 1998 Frodo Looijaard + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + + +/* This is a stub files, that either includes (the kernel + header) or "i2c/i2c.h" (the header in the i2c directory). */ + +#ifdef I2C +#include "i2c/i2c.h" +#else /* def I2C */ +#include +#endif /* def I2C */ + diff --git a/kernel/include/smbus.h b/kernel/include/smbus.h index 6227867d..4ecbf545 100644 --- a/kernel/include/smbus.h +++ b/kernel/include/smbus.h @@ -24,12 +24,7 @@ OK, earlier versions are not; later versions will probably give problems too. */ -#ifdef I2C -#include "i2c/i2c.h" -#else /* def I2C */ -#include -#endif /* def I2C */ - +#include "i2c.h" #include /* SPINLOCK is defined in i2c.h. */ diff --git a/src/i2c.h b/src/i2c.h new file mode 100644 index 00000000..b060d4e6 --- /dev/null +++ b/src/i2c.h @@ -0,0 +1,29 @@ +/* + i2c.h - A Linux module for reading sensor data. + Copyright (c) 1998 Frodo Looijaard + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + + +/* This is a stub files, that either includes (the kernel + header) or "i2c/i2c.h" (the header in the i2c directory). */ + +#ifdef I2C +#include "i2c/i2c.h" +#else /* def I2C */ +#include +#endif /* def I2C */ + diff --git a/src/smbus.h b/src/smbus.h index 6227867d..4ecbf545 100644 --- a/src/smbus.h +++ b/src/smbus.h @@ -24,12 +24,7 @@ OK, earlier versions are not; later versions will probably give problems too. */ -#ifdef I2C -#include "i2c/i2c.h" -#else /* def I2C */ -#include -#endif /* def I2C */ - +#include "i2c.h" #include /* SPINLOCK is defined in i2c.h. */