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. */