diff --git a/Makefile b/Makefile index 3240ff04..9fcbe83d 100644 --- a/Makefile +++ b/Makefile @@ -83,8 +83,8 @@ CC := gcc # Determine the default compiler flags # 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 -EXCFLAGS := -I. -O2 -Ii2c +CFLAGS := -D__KERNEL__ -DMODULE -I. -Ii2c -O2 -fomit-frame-pointer -DLM_SENSORS +EXCFLAGS := -I. -O2 -Ii2c -D LM_SENSORS ifeq ($(DEBUG),1) CFLAGS += -DDEBUG diff --git a/i2c/algo-bit.c b/i2c/algo-bit.c index a336b330..1df38ce4 100644 --- a/i2c/algo-bit.c +++ b/i2c/algo-bit.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* ------------------------------------------------------------------------- */ -static char alg_rcsid[] = "$Id: algo-bit.c,v 1.2 1998/11/03 03:48:44 phil Exp $"; +static char alg_rcsid[] = "$Id: algo-bit.c,v 1.7 1998/09/28 06:45:38 i2c Exp i2c $"; #include #include @@ -639,6 +639,12 @@ MODULE_PARM_DESC(bit_scan, "Scan for active chips on the bus"); MODULE_PARM_DESC(i2c_debug,"debug level - 0 off; 1 normal; 2,3 more verbose; 9 bit-protocol"); +#ifndef LM_SENSORS +EXPORT_SYMBOL(i2c_bit_add_bus); +EXPORT_SYMBOL(i2c_bit_del_bus); +#endif + + int init_module(void) { return algo_bit_init(); @@ -649,3 +655,13 @@ void cleanup_module(void) i2c_del_algorithm(&bit_algo); } #endif + + + + + + + + + + diff --git a/i2c/bit-lp.c b/i2c/bit-lp.c index 04251be7..8ecb62b3 100644 --- a/i2c/bit-lp.c +++ b/i2c/bit-lp.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* ------------------------------------------------------------------------- */ -static char rcsid[] = "$Id: bit-lp.c,v 1.1 1998/11/02 20:29:27 frodo Exp $"; +static char rcsid[] = "$Id: bit-lp.c,v 1.5 1998/09/28 06:45:38 i2c Exp i2c $"; /* ------------------------------------------------------------------------- */ #include @@ -151,6 +151,10 @@ MODULE_DESCRIPTION("I2C-Bus adapter routines for Philips parallel port adapter") MODULE_PARM(base, "i"); +#ifndef LM_SENSORS +EXPORT_NO_SYMBOLS; +#endif + int init_module(void) { if (base==0) { diff --git a/i2c/i2c-core.c b/i2c/i2c-core.c index 38956349..49e80012 100644 --- a/i2c/i2c-core.c +++ b/i2c/i2c-core.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* ------------------------------------------------------------------------- */ -#define RCSID "$Id: i2c-core.c,v 1.5 1998/12/01 21:11:32 frodo Exp $" +#define RCSID "$Id: i2c.c,v 1.7 1998/09/28 06:45:38 i2c Exp i2c $" /* ------------------------------------------------------------------------- */ #include @@ -173,6 +173,7 @@ int i2c_del_adapter(struct i2c_adapter *adap) * flag, as _all_ clients that reside on the adapter * must be deleted, as this would cause invalid states. */ + /* i2c_detach_client(client); */ client->driver->detach_client(client); } /* all done, now unregister */ @@ -248,7 +249,7 @@ int i2c_del_driver(struct i2c_driver *driver) if (client != NULL && client->driver == driver) { DEB2(printk("i2c: detaching client %s:\n", client->name)); - /* i2c_detach_client(client); */ + /*i2c_detach_client(client);*/ driver->detach_client(client); } } @@ -445,12 +446,30 @@ int i2c_adapter_id(struct i2c_adapter *adap) } + #ifdef MODULE MODULE_AUTHOR("Simon G. Vogl "); MODULE_DESCRIPTION("I2C-Bus main module"); MODULE_PARM(i2c_debug, "i"); MODULE_PARM_DESC(i2c_debug,"debug level"); +#ifndef LM_SENSORS +EXPORT_SYMBOL(i2c_add_algorithm); +EXPORT_SYMBOL(i2c_del_algorithm); +EXPORT_SYMBOL(i2c_add_adapter); +EXPORT_SYMBOL(i2c_del_adapter); +EXPORT_SYMBOL(i2c_add_driver); +EXPORT_SYMBOL(i2c_del_driver); +EXPORT_SYMBOL(i2c_attach_client); +EXPORT_SYMBOL(i2c_detach_client); + +EXPORT_SYMBOL(i2c_master_send); +EXPORT_SYMBOL(i2c_master_recv); +EXPORT_SYMBOL(i2c_control); +EXPORT_SYMBOL(i2c_transfer); +#endif + + int init_module(void) { return i2c_init(); diff --git a/i2c/i2c-dev.c b/i2c/i2c-dev.c index f823bd71..8b7c3348 100644 --- a/i2c/i2c-dev.c +++ b/i2c/i2c-dev.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* ------------------------------------------------------------------------- */ -#define RCSID "$Id: i2c-dev.c,v 1.1 1998/11/02 20:29:27 frodo Exp $" +#define RCSID "$Id: i2c-dev.c,v 1.6 1998/09/28 06:45:38 i2c Exp i2c $" /* ------------------------------------------------------------------------- */ #include @@ -337,6 +337,10 @@ struct i2c_driver driver = { MODULE_AUTHOR("Simon G. Vogl "); MODULE_DESCRIPTION("I2C-Bus character device interface"); +#ifndef LM_SENSORS +EXPORT_NO_SYMBOLS; +#endif + int init_module(void) { if (register_chrdev(I2C_MAJOR,"i2c",&i2c_fops)) {