2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-30 22:05:11 +00:00

Cleaned up the i2c files

* 'cvs admin -ko i2c' should disable all RCS keyword substitutions from now
  on
* Put all EXPORT stuff between #ifdef LM_SENSORS #endif statements.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@21 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Frodo Looijaard
1998-12-02 15:11:18 +00:00
parent af7232145d
commit 01bb2de024
5 changed files with 50 additions and 7 deletions

View File

@@ -83,8 +83,8 @@ CC := gcc
# Determine the default compiler flags # Determine the default compiler flags
# CFLAGS is to create in-kernel object files (modules); EXCFLAGS is to create # CFLAGS is to create in-kernel object files (modules); EXCFLAGS is to create
# non-kernel object files (which are linked into executables). # non-kernel object files (which are linked into executables).
CFLAGS := -D__KERNEL__ -DMODULE -I. -Ii2c -O2 -fomit-frame-pointer CFLAGS := -D__KERNEL__ -DMODULE -I. -Ii2c -O2 -fomit-frame-pointer -DLM_SENSORS
EXCFLAGS := -I. -O2 -Ii2c EXCFLAGS := -I. -O2 -Ii2c -D LM_SENSORS
ifeq ($(DEBUG),1) ifeq ($(DEBUG),1)
CFLAGS += -DDEBUG CFLAGS += -DDEBUG

View File

@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 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 <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
@@ -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"); 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) int init_module(void)
{ {
return algo_bit_init(); return algo_bit_init();
@@ -649,3 +655,13 @@ void cleanup_module(void)
i2c_del_algorithm(&bit_algo); i2c_del_algorithm(&bit_algo);
} }
#endif #endif

View File

@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 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 <linux/kernel.h> #include <linux/kernel.h>
@@ -151,6 +151,10 @@ MODULE_DESCRIPTION("I2C-Bus adapter routines for Philips parallel port adapter")
MODULE_PARM(base, "i"); MODULE_PARM(base, "i");
#ifndef LM_SENSORS
EXPORT_NO_SYMBOLS;
#endif
int init_module(void) int init_module(void)
{ {
if (base==0) { if (base==0) {

View File

@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 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 <linux/module.h> #include <linux/module.h>
@@ -173,6 +173,7 @@ int i2c_del_adapter(struct i2c_adapter *adap)
* flag, as _all_ clients that reside on the adapter * flag, as _all_ clients that reside on the adapter
* must be deleted, as this would cause invalid states. * must be deleted, as this would cause invalid states.
*/ */
/* i2c_detach_client(client); */
client->driver->detach_client(client); client->driver->detach_client(client);
} }
/* all done, now unregister */ /* all done, now unregister */
@@ -248,7 +249,7 @@ int i2c_del_driver(struct i2c_driver *driver)
if (client != NULL && client->driver == driver) { if (client != NULL && client->driver == driver) {
DEB2(printk("i2c: detaching client %s:\n", DEB2(printk("i2c: detaching client %s:\n",
client->name)); client->name));
/* i2c_detach_client(client); */ /*i2c_detach_client(client);*/
driver->detach_client(client); driver->detach_client(client);
} }
} }
@@ -445,12 +446,30 @@ int i2c_adapter_id(struct i2c_adapter *adap)
} }
#ifdef MODULE #ifdef MODULE
MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>"); MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>");
MODULE_DESCRIPTION("I2C-Bus main module"); MODULE_DESCRIPTION("I2C-Bus main module");
MODULE_PARM(i2c_debug, "i"); MODULE_PARM(i2c_debug, "i");
MODULE_PARM_DESC(i2c_debug,"debug level"); 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) int init_module(void)
{ {
return i2c_init(); return i2c_init();

View File

@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 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 <linux/kernel.h> #include <linux/kernel.h>
@@ -337,6 +337,10 @@ struct i2c_driver driver = {
MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>"); MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>");
MODULE_DESCRIPTION("I2C-Bus character device interface"); MODULE_DESCRIPTION("I2C-Bus character device interface");
#ifndef LM_SENSORS
EXPORT_NO_SYMBOLS;
#endif
int init_module(void) int init_module(void)
{ {
if (register_chrdev(I2C_MAJOR,"i2c",&i2c_fops)) { if (register_chrdev(I2C_MAJOR,"i2c",&i2c_fops)) {