mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-09 16:21:51 +00:00
First step to make it possible to integrate lm_sensors modules into
the kernel. * <kernel/init.h> is now included for all modules * Initialization-time only functions and variables are marked with __init * EXPORT_SYMBOL or EXPORT_NO_SYMBOLS declarations added git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@513 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
7de5a15384
commit
fcbe78a669
25 files changed
+309
-133
No files matched your search
@@ -153,7 +153,8 @@ CFLAGS += -Wall -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \
|
||||
-Wcast-align -Wwrite-strings -Wnested-externs -Winline
|
||||
endif
|
||||
|
||||
MODCFLAGS := $(CFLAGS) -D__KERNEL__ -DMODULE -fomit-frame-pointer
|
||||
MODCFLAGS := $(CFLAGS) -D__KERNEL__ -DMODULE -fomit-frame-pointer
|
||||
MODCFLAGS := $(MODCFLAGS) -DEXPORT_SYMTAB
|
||||
PROGCFLAGS := $(CFLAGS)
|
||||
ARCFLAGS := $(CFLAGS)
|
||||
LIBCFLAGS := $(CFLAGS) -fpic
|
||||
|
||||
@@ -82,6 +82,12 @@
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
/* undefine this if separate ACPI software is accessing the
|
||||
registers at the offset defined at 0x10.
|
||||
*/
|
||||
@@ -143,8 +149,8 @@
|
||||
#define ALI15X3_STS_ERR 0xE0 /* all the bad error bits */
|
||||
|
||||
|
||||
static int ali15x3_init(void);
|
||||
static int ali15x3_cleanup(void);
|
||||
static int __init ali15x3_init(void);
|
||||
static int __init ali15x3_cleanup(void);
|
||||
static int ali15x3_setup(void);
|
||||
static s32 ali15x3_access(struct i2c_adapter *adap, u8 addr, char read_write,
|
||||
u8 command, int size, union i2c_smbus_data * data);
|
||||
@@ -179,7 +185,7 @@ static struct i2c_adapter ali15x3_adapter = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static int ali15x3_initialized;
|
||||
static int __init ali15x3_initialized;
|
||||
#ifdef MAP_ACPI
|
||||
static unsigned short ali15x3_acpia = 0;
|
||||
#endif
|
||||
@@ -598,7 +604,7 @@ void ali15x3_dec(struct i2c_adapter *adapter)
|
||||
MOD_DEC_USE_COUNT;
|
||||
}
|
||||
|
||||
int ali15x3_init(void)
|
||||
int __init ali15x3_init(void)
|
||||
{
|
||||
int res;
|
||||
printk("ali15x3.o version %s (%s)\n",LM_VERSION,LM_DATE);
|
||||
@@ -630,7 +636,7 @@ int ali15x3_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ali15x3_cleanup(void)
|
||||
int __init ali15x3_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
if (ali15x3_initialized >= 2)
|
||||
@@ -651,6 +657,8 @@ int ali15x3_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>, Philip Edelbrock <phil@netroedge.com>, and Mark D. Studebaker <mds@eng.paradyne.com>");
|
||||
|
||||
@@ -39,6 +39,11 @@
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
/* PCI device */
|
||||
#define VENDOR PCI_VENDOR_ID_APPLE
|
||||
@@ -171,7 +176,7 @@ static int find_hydra(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int init_i2c_hydra(void)
|
||||
int __init init_i2c_hydra(void)
|
||||
{
|
||||
if (find_hydra() < 0) {
|
||||
printk("Error while reading PCI configuration\n");
|
||||
@@ -190,6 +195,8 @@ int init_i2c_hydra(void)
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
MODULE_AUTHOR("Geert Uytterhoeven <geert@linux-m68k.org>");
|
||||
MODULE_DESCRIPTION("i2c for Apple Hydra Mac I/O");
|
||||
|
||||
+13
-5
@@ -29,14 +29,20 @@
|
||||
|
||||
#include <linux/i2c.h>
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
#include "version.h"
|
||||
#include "i2c-isa.h"
|
||||
|
||||
static void isa_inc_use (struct i2c_adapter *adapter);
|
||||
static void isa_dec_use (struct i2c_adapter *adapter);
|
||||
|
||||
static int isa_init(void);
|
||||
static int isa_cleanup(void);
|
||||
static int __init isa_init(void);
|
||||
static int __init isa_cleanup(void);
|
||||
|
||||
#ifdef MODULE
|
||||
extern int init_module(void);
|
||||
@@ -66,7 +72,7 @@ static struct i2c_adapter isa_adapter = {
|
||||
};
|
||||
|
||||
/* Used in isa_init/cleanup */
|
||||
static int isa_initialized;
|
||||
static int __init isa_initialized;
|
||||
|
||||
void isa_inc_use (struct i2c_adapter *adapter)
|
||||
{
|
||||
@@ -82,7 +88,7 @@ void isa_dec_use (struct i2c_adapter *adapter)
|
||||
#endif
|
||||
}
|
||||
|
||||
int isa_init(void)
|
||||
int __init isa_init(void)
|
||||
{
|
||||
int res;
|
||||
printk("i2c-isa.o version %s (%s)\n",LM_VERSION,LM_DATE);
|
||||
@@ -110,7 +116,7 @@ int isa_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int isa_cleanup(void)
|
||||
int __init isa_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
if (isa_initialized >= 2)
|
||||
@@ -132,6 +138,8 @@ int isa_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>");
|
||||
|
||||
@@ -36,6 +36,11 @@
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
/* PIIX4 SMBus address offsets */
|
||||
#define SMBHSTSTS (0 + piix4_smba)
|
||||
@@ -85,8 +90,8 @@ MODULE_PARM(force_addr,"i");
|
||||
MODULE_PARM_DESC(force_addr,"Forcibly enable the PIIX4 at the given address. "
|
||||
"EXTREMELY DANGEROUS!");
|
||||
|
||||
static int piix4_init(void);
|
||||
static int piix4_cleanup(void);
|
||||
static int __init piix4_init(void);
|
||||
static int __init piix4_cleanup(void);
|
||||
static int piix4_setup(void);
|
||||
static s32 piix4_access(struct i2c_adapter *adap, u8 addr, char read_write,
|
||||
u8 command, int size, union i2c_smbus_data * data);
|
||||
@@ -121,7 +126,7 @@ static struct i2c_adapter piix4_adapter = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static int piix4_initialized;
|
||||
static int __init piix4_initialized;
|
||||
static unsigned short piix4_smba = 0;
|
||||
|
||||
|
||||
@@ -435,7 +440,7 @@ void piix4_dec(struct i2c_adapter *adapter)
|
||||
MOD_DEC_USE_COUNT;
|
||||
}
|
||||
|
||||
int piix4_init(void)
|
||||
int __init piix4_init(void)
|
||||
{
|
||||
int res;
|
||||
printk("piix4.o version %s (%s)\n",LM_VERSION,LM_DATE);
|
||||
@@ -464,7 +469,7 @@ int piix4_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int piix4_cleanup(void)
|
||||
int __init piix4_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
if (piix4_initialized >= 2)
|
||||
@@ -482,6 +487,8 @@ int piix4_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl> and Philip Edelbrock <phil@netroedge.com>");
|
||||
|
||||
@@ -33,6 +33,12 @@
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/i2c-algo-bit.h>
|
||||
#include "compat.h"
|
||||
@@ -204,7 +210,7 @@ static int find_via(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int init_i2c_via(void)
|
||||
static int __init init_i2c_via(void)
|
||||
{
|
||||
if (find_via() < 0) {
|
||||
printk("Error while reading PCI configuration\n");
|
||||
@@ -232,6 +238,8 @@ static int init_i2c_via(void)
|
||||
}
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
MODULE_AUTHOR("Kyösti Mälkki <kmalkki@cc.hut.fi>");
|
||||
MODULE_DESCRIPTION("i2c for Via vt82c586b southbridge");
|
||||
|
||||
@@ -36,6 +36,13 @@
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef PCI_DEVICE_ID_VIA_82C596_3
|
||||
#define PCI_DEVICE_ID_VIA_82C596_3 0x3050
|
||||
#endif
|
||||
@@ -100,8 +107,8 @@ MODULE_PARM(force_addr,"i");
|
||||
MODULE_PARM_DESC(force_addr,"Forcibly enable the VT82C596 SMBus at the given address. "
|
||||
"EXTREMELY DANGEROUS!");
|
||||
|
||||
static int vt596_init(void);
|
||||
static int vt596_cleanup(void);
|
||||
static int __init vt596_init(void);
|
||||
static int __init vt596_cleanup(void);
|
||||
static int vt596_setup(void);
|
||||
static s32 vt596_access(struct i2c_adapter *adap, u8 addr, char read_write,
|
||||
u8 command, int size, union i2c_smbus_data * data);
|
||||
@@ -136,7 +143,7 @@ static struct i2c_adapter vt596_adapter = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static int vt596_initialized;
|
||||
static int __init vt596_initialized;
|
||||
static unsigned short vt596_smba = 0;
|
||||
|
||||
|
||||
@@ -470,7 +477,7 @@ void vt596_dec(struct i2c_adapter *adapter)
|
||||
MOD_DEC_USE_COUNT;
|
||||
}
|
||||
|
||||
int vt596_init(void)
|
||||
int __init vt596_init(void)
|
||||
{
|
||||
int res;
|
||||
printk("via2.o version %s (%s)\n",LM_VERSION,LM_DATE);
|
||||
@@ -499,7 +506,7 @@ int vt596_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int vt596_cleanup(void)
|
||||
int __init vt596_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
if (vt596_initialized >= 2)
|
||||
@@ -517,11 +524,14 @@ int vt596_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl> and Philip Edelbrock <phil@netroedge.com>");
|
||||
MODULE_DESCRIPTION("vt82c596 SMBus driver");
|
||||
|
||||
|
||||
int init_module(void)
|
||||
{
|
||||
return vt596_init();
|
||||
|
||||
@@ -36,6 +36,13 @@
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef PCI_DEVICE_ID_VIA_82C596_3
|
||||
#define PCI_DEVICE_ID_VIA_82C596_3 0x3050
|
||||
#endif
|
||||
@@ -100,8 +107,8 @@ MODULE_PARM(force_addr,"i");
|
||||
MODULE_PARM_DESC(force_addr,"Forcibly enable the VT82C596 SMBus at the given address. "
|
||||
"EXTREMELY DANGEROUS!");
|
||||
|
||||
static int vt596_init(void);
|
||||
static int vt596_cleanup(void);
|
||||
static int __init vt596_init(void);
|
||||
static int __init vt596_cleanup(void);
|
||||
static int vt596_setup(void);
|
||||
static s32 vt596_access(struct i2c_adapter *adap, u8 addr, char read_write,
|
||||
u8 command, int size, union i2c_smbus_data * data);
|
||||
@@ -136,7 +143,7 @@ static struct i2c_adapter vt596_adapter = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static int vt596_initialized;
|
||||
static int __init vt596_initialized;
|
||||
static unsigned short vt596_smba = 0;
|
||||
|
||||
|
||||
@@ -470,7 +477,7 @@ void vt596_dec(struct i2c_adapter *adapter)
|
||||
MOD_DEC_USE_COUNT;
|
||||
}
|
||||
|
||||
int vt596_init(void)
|
||||
int __init vt596_init(void)
|
||||
{
|
||||
int res;
|
||||
printk("via2.o version %s (%s)\n",LM_VERSION,LM_DATE);
|
||||
@@ -499,7 +506,7 @@ int vt596_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int vt596_cleanup(void)
|
||||
int __init vt596_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
if (vt596_initialized >= 2)
|
||||
@@ -517,11 +524,14 @@ int vt596_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl> and Philip Edelbrock <phil@netroedge.com>");
|
||||
MODULE_DESCRIPTION("vt82c596 SMBus driver");
|
||||
|
||||
|
||||
int init_module(void)
|
||||
{
|
||||
return vt596_init();
|
||||
|
||||
+14
-19
@@ -44,6 +44,12 @@
|
||||
#include <linux/bios32.h>
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
/* 3DFX defines */
|
||||
#ifndef PCI_VENDOR_ID_3DFX
|
||||
#define PCI_VENDOR_ID_3DFX 0x121a
|
||||
@@ -52,8 +58,8 @@
|
||||
#define PCI_DEVICE_ID_3DFX_VOODOO3 0x05
|
||||
#endif
|
||||
|
||||
static int voodoo3_init(void);
|
||||
static int voodoo3_cleanup(void);
|
||||
static int __init voodoo3_init(void);
|
||||
static int __init voodoo3_cleanup(void);
|
||||
static int voodoo3_setup(void);
|
||||
static s32 voodoo3_access(struct i2c_adapter *adap, u8 addr, char read_write,
|
||||
u8 command, int size, union i2c_smbus_data * data);
|
||||
@@ -73,20 +79,6 @@ static void config_v3(struct pci_dev *dev, int num);
|
||||
static void voodoo3_inc(struct i2c_adapter *adapter);
|
||||
static void voodoo3_dec(struct i2c_adapter *adapter);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef MODULE
|
||||
extern int init_module(void);
|
||||
extern int cleanup_module(void);
|
||||
@@ -113,7 +105,7 @@ static struct i2c_adapter voodoo3_adapter = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static int voodoo3_initialized;
|
||||
static int __init voodoo3_initialized;
|
||||
static unsigned short voodoo3_smba = 0;
|
||||
static unsigned int state=0xcf980020;
|
||||
static unsigned char *mem;
|
||||
@@ -533,7 +525,7 @@ void voodoo3_dec(struct i2c_adapter *adapter)
|
||||
MOD_DEC_USE_COUNT;
|
||||
}
|
||||
|
||||
int voodoo3_init(void)
|
||||
int __init voodoo3_init(void)
|
||||
{
|
||||
int res;
|
||||
printk("i2c-voodoo3.o version %s (%s)\n",LM_VERSION,LM_DATE);
|
||||
@@ -562,7 +554,7 @@ int voodoo3_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int voodoo3_cleanup(void)
|
||||
int __init voodoo3_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -581,11 +573,14 @@ int voodoo3_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl> and Philip Edelbrock <phil@netroedge.com> and Ralph Metzler <rjkm@thp.uni-koeln.de>");
|
||||
MODULE_DESCRIPTION("Voodoo3 I2C/SMBus driver");
|
||||
|
||||
|
||||
int init_module(void)
|
||||
{
|
||||
return voodoo3_init();
|
||||
|
||||
+12
-5
@@ -27,6 +27,12 @@
|
||||
#include "version.h"
|
||||
#include "compat.h"
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
/* Addresses to scan */
|
||||
static unsigned short normal_i2c[] = {SENSORS_I2C_END};
|
||||
static unsigned short normal_i2c_range[] = {0x18,0x1a,0x29,0x2b,
|
||||
@@ -101,8 +107,8 @@ extern int init_module(void);
|
||||
extern int cleanup_module(void);
|
||||
#endif /* MODULE */
|
||||
|
||||
static int adm1021_init(void);
|
||||
static int adm1021_cleanup(void);
|
||||
static int __init adm1021_init(void);
|
||||
static int __init adm1021_cleanup(void);
|
||||
static int adm1021_attach_adapter(struct i2c_adapter *adapter);
|
||||
static int adm1021_detect(struct i2c_adapter *adapter, int address, int kind);
|
||||
static void adm1021_init_client(struct i2c_client *client);
|
||||
@@ -165,7 +171,7 @@ static ctl_table adm1021_max_dir_table_template[] = {
|
||||
|
||||
|
||||
/* Used by init/cleanup */
|
||||
static int adm1021_initialized = 0;
|
||||
static int __init adm1021_initialized = 0;
|
||||
|
||||
/* I choose here for semi-static allocation. Complete dynamic
|
||||
allocation could also be used; the code needed for this would probably
|
||||
@@ -489,7 +495,7 @@ void adm1021_alarms(struct i2c_client *client, int operation, int ctl_name,
|
||||
}
|
||||
}
|
||||
|
||||
int adm1021_init(void)
|
||||
int __init adm1021_init(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -504,7 +510,7 @@ int adm1021_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int adm1021_cleanup(void)
|
||||
int __init adm1021_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -519,6 +525,7 @@ int adm1021_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
|
||||
+11
-5
@@ -59,6 +59,11 @@
|
||||
#include "i2c-isa.h"
|
||||
#include "sensors.h"
|
||||
#include "compat.h"
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
|
||||
/* Addresses to scan */
|
||||
@@ -233,8 +238,8 @@ struct adm9240_data {
|
||||
};
|
||||
|
||||
|
||||
static int adm9240_init(void);
|
||||
static int adm9240_cleanup(void);
|
||||
static int __init adm9240_init(void);
|
||||
static int __init adm9240_cleanup(void);
|
||||
|
||||
static int adm9240_attach_adapter(struct i2c_adapter *adapter);
|
||||
static int adm9240_detect(struct i2c_adapter *adapter, int address, int kind);
|
||||
@@ -283,7 +288,7 @@ static struct i2c_driver adm9240_driver = {
|
||||
};
|
||||
|
||||
/* Used by adm9240_init/cleanup */
|
||||
static int adm9240_initialized = 0;
|
||||
static int __init adm9240_initialized = 0;
|
||||
|
||||
/* The /proc/sys entries */
|
||||
/* These files are created for each detected ADM9240. This is just a template;
|
||||
@@ -748,7 +753,7 @@ void adm9240_vid(struct i2c_client *client, int operation, int ctl_name,
|
||||
}
|
||||
}
|
||||
|
||||
int adm9240_init(void)
|
||||
int __init adm9240_init(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -764,7 +769,7 @@ int adm9240_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int adm9240_cleanup(void)
|
||||
int __init adm9240_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -778,6 +783,7 @@ int adm9240_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
|
||||
+12
-5
@@ -28,6 +28,12 @@
|
||||
#include "i2c-isa.h"
|
||||
#include "version.h"
|
||||
#include "compat.h"
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
|
||||
/* Addresses to scan */
|
||||
static unsigned short normal_i2c[] = {SENSORS_I2C_END};
|
||||
@@ -76,8 +82,8 @@ extern int init_module(void);
|
||||
extern int cleanup_module(void);
|
||||
#endif /* MODULE */
|
||||
|
||||
static int bt869_init(void);
|
||||
static int bt869_cleanup(void);
|
||||
static int __init bt869_init(void);
|
||||
static int __init bt869_cleanup(void);
|
||||
static int bt869_attach_adapter(struct i2c_adapter *adapter);
|
||||
static int bt869_detect(struct i2c_adapter *adapter, int address, int kind);
|
||||
static void bt869_init_client(struct i2c_client *client);
|
||||
@@ -137,7 +143,7 @@ static ctl_table bt869_dir_table_template[] = {
|
||||
};
|
||||
|
||||
/* Used by init/cleanup */
|
||||
static int bt869_initialized = 0;
|
||||
static int __init bt869_initialized = 0;
|
||||
|
||||
/* I choose here for semi-static bt869 allocation. Complete dynamic
|
||||
allocation could also be used; the code needed for this would probably
|
||||
@@ -518,7 +524,7 @@ void bt869_depth(struct i2c_client *client, int operation, int ctl_name,
|
||||
}
|
||||
}
|
||||
|
||||
int bt869_init(void)
|
||||
int __init bt869_init(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -533,7 +539,7 @@ int bt869_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int bt869_cleanup(void)
|
||||
int __init bt869_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -548,6 +554,7 @@ int bt869_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
|
||||
+13
-5
@@ -27,6 +27,13 @@
|
||||
#include "version.h"
|
||||
#include "compat.h"
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
|
||||
/* Addresses to scan */
|
||||
static unsigned short normal_i2c[] = {SENSORS_I2C_END};
|
||||
static unsigned short normal_i2c_range[] = {0x50,0x57,SENSORS_I2C_END};
|
||||
@@ -74,8 +81,8 @@ extern int init_module(void);
|
||||
extern int cleanup_module(void);
|
||||
#endif /* MODULE */
|
||||
|
||||
static int eeprom_init(void);
|
||||
static int eeprom_cleanup(void);
|
||||
static int __init eeprom_init(void);
|
||||
static int __init eeprom_cleanup(void);
|
||||
|
||||
static int eeprom_attach_adapter(struct i2c_adapter *adapter);
|
||||
static int eeprom_detect(struct i2c_adapter *adapter, int address, int kind);
|
||||
@@ -133,7 +140,7 @@ static ctl_table eeprom_dir_table_template[] = {
|
||||
};
|
||||
|
||||
/* Used by init/cleanup */
|
||||
static int eeprom_initialized = 0;
|
||||
static int __init eeprom_initialized = 0;
|
||||
|
||||
/* I choose here for semi-static LM78 allocation. Complete dynamic
|
||||
allocation could also be used; the code needed for this would probably
|
||||
@@ -383,7 +390,7 @@ void eeprom_contents(struct i2c_client *client, int operation, int ctl_name,
|
||||
}
|
||||
}
|
||||
|
||||
int eeprom_init(void)
|
||||
int __init eeprom_init(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -398,7 +405,7 @@ int eeprom_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int eeprom_cleanup(void)
|
||||
int __init eeprom_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -413,6 +420,7 @@ int eeprom_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
|
||||
+12
-5
@@ -28,6 +28,12 @@
|
||||
#include "version.h"
|
||||
#include "compat.h"
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
/* Addresses to scan */
|
||||
static unsigned short normal_i2c[] = {0x2c,0x2d,SENSORS_I2C_END};
|
||||
static unsigned short normal_i2c_range[] = {SENSORS_I2C_END};
|
||||
@@ -168,8 +174,8 @@ extern int init_module(void);
|
||||
extern int cleanup_module(void);
|
||||
#endif /* MODULE */
|
||||
|
||||
static int gl518_init(void);
|
||||
static int gl518_cleanup(void);
|
||||
static int __init gl518_init(void);
|
||||
static int __init gl518_cleanup(void);
|
||||
static int gl518_attach_adapter(struct i2c_adapter *adapter);
|
||||
static int gl518_detect(struct i2c_adapter *adapter, int address, int kind);
|
||||
static void gl518_init_client(struct i2c_client *client);
|
||||
@@ -248,7 +254,7 @@ static ctl_table gl518_dir_table_template[] = {
|
||||
};
|
||||
|
||||
/* Used by init/cleanup */
|
||||
static int gl518_initialized = 0;
|
||||
static int __init gl518_initialized = 0;
|
||||
|
||||
/* I choose here for semi-static GL518SM allocation. Complete dynamic
|
||||
allocation could also be used; the code needed for this would probably
|
||||
@@ -897,7 +903,7 @@ void gl518_iterate(struct i2c_client *client, int operation, int ctl_name,
|
||||
}
|
||||
}
|
||||
|
||||
int gl518_init(void)
|
||||
int __init gl518_init(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -912,7 +918,7 @@ int gl518_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int gl518_cleanup(void)
|
||||
int __init gl518_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -927,6 +933,7 @@ int gl518_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
|
||||
+13
-5
@@ -28,6 +28,13 @@
|
||||
#include "version.h"
|
||||
#include "compat.h"
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
|
||||
/* Addresses to scan */
|
||||
static unsigned short normal_i2c[] = {0x2c,0x2d,SENSORS_I2C_END};
|
||||
static unsigned short normal_i2c_range[] = {SENSORS_I2C_END};
|
||||
@@ -171,8 +178,8 @@ extern int init_module(void);
|
||||
extern int cleanup_module(void);
|
||||
#endif /* MODULE */
|
||||
|
||||
static int gl520_init(void);
|
||||
static int gl520_cleanup(void);
|
||||
static int __init gl520_init(void);
|
||||
static int __init gl520_cleanup(void);
|
||||
static int gl520_attach_adapter(struct i2c_adapter *adapter);
|
||||
static int gl520_detect(struct i2c_adapter *adapter, int address, int kind);
|
||||
static void gl520_init_client(struct i2c_client *client);
|
||||
@@ -257,7 +264,7 @@ static ctl_table gl520_dir_table_template[] = {
|
||||
};
|
||||
|
||||
/* Used by init/cleanup */
|
||||
static int gl520_initialized = 0;
|
||||
static int __init gl520_initialized = 0;
|
||||
|
||||
/* I choose here for semi-static GL520SM allocation. Complete dynamic
|
||||
allocation could also be used; the code needed for this would probably
|
||||
@@ -784,7 +791,7 @@ void gl520_config(struct i2c_client *client, int operation, int ctl_name,
|
||||
}
|
||||
}
|
||||
|
||||
int gl520_init(void)
|
||||
int __init gl520_init(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -799,7 +806,7 @@ int gl520_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int gl520_cleanup(void)
|
||||
int __init gl520_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -814,6 +821,7 @@ int gl520_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
|
||||
+12
-5
@@ -34,6 +34,12 @@
|
||||
#include "sensors.h"
|
||||
#include "i2c-isa.h"
|
||||
#include "version.h"
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
|
||||
/* Many constants specified below */
|
||||
|
||||
@@ -57,8 +63,8 @@ extern int init_module(void);
|
||||
extern int cleanup_module(void);
|
||||
#endif /* MODULE */
|
||||
|
||||
static int icspll_init(void);
|
||||
static int icspll_cleanup(void);
|
||||
static int __init icspll_init(void);
|
||||
static int __init icspll_cleanup(void);
|
||||
|
||||
static int icspll_attach_adapter(struct i2c_adapter *adapter);
|
||||
static int icspll_detach_client(struct i2c_client *client);
|
||||
@@ -104,7 +110,7 @@ static ctl_table icspll_dir_table_template[] = {
|
||||
static u8 tempdata[MAXBLOCK_SIZE];
|
||||
|
||||
/* Used by init/cleanup */
|
||||
static int icspll_initialized = 0;
|
||||
static int __init icspll_initialized = 0;
|
||||
|
||||
/* I choose here for semi-static allocation. Complete dynamic
|
||||
allocation could also be used; the code needed for this would probably
|
||||
@@ -313,7 +319,7 @@ void icspll_contents(struct i2c_client *client, int operation, int ctl_name,
|
||||
}
|
||||
}
|
||||
|
||||
int icspll_init(void)
|
||||
int __init icspll_init(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -328,7 +334,7 @@ int icspll_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int icspll_cleanup(void)
|
||||
int __init icspll_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -343,6 +349,7 @@ int icspll_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
|
||||
+13
-5
@@ -26,6 +26,13 @@
|
||||
#include "version.h"
|
||||
#include "compat.h"
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
|
||||
/* Addresses to scan */
|
||||
static unsigned short normal_i2c[] = {SENSORS_I2C_END};
|
||||
static unsigned short normal_i2c_range[] = {0x48,0x4f,SENSORS_I2C_END};
|
||||
@@ -70,8 +77,8 @@ extern int init_module(void);
|
||||
extern int cleanup_module(void);
|
||||
#endif /* MODULE */
|
||||
|
||||
static int lm75_init(void);
|
||||
static int lm75_cleanup(void);
|
||||
static int __init lm75_init(void);
|
||||
static int __init lm75_cleanup(void);
|
||||
static int lm75_attach_adapter(struct i2c_adapter *adapter);
|
||||
static int lm75_detect(struct i2c_adapter *adapter, int address, int kind);
|
||||
static void lm75_init_client(struct i2c_client *client);
|
||||
@@ -112,7 +119,7 @@ static ctl_table lm75_dir_table_template[] = {
|
||||
};
|
||||
|
||||
/* Used by init/cleanup */
|
||||
static int lm75_initialized = 0;
|
||||
static int __init lm75_initialized = 0;
|
||||
|
||||
/* I choose here for semi-static LM75 allocation. Complete dynamic
|
||||
allocation could also be used; the code needed for this would probably
|
||||
@@ -371,7 +378,7 @@ void lm75_temp(struct i2c_client *client, int operation, int ctl_name,
|
||||
}
|
||||
}
|
||||
|
||||
int lm75_init(void)
|
||||
int __init lm75_init(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -386,7 +393,7 @@ int lm75_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lm75_cleanup(void)
|
||||
int __init lm75_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -401,6 +408,7 @@ int lm75_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
|
||||
+13
-5
@@ -32,6 +32,13 @@
|
||||
#include "sensors.h"
|
||||
#include "compat.h"
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
|
||||
/* Addresses to scan */
|
||||
static unsigned short normal_i2c[] = {SENSORS_I2C_END};
|
||||
static unsigned short normal_i2c_range[] = {0x20,0x2f,SENSORS_I2C_END};
|
||||
@@ -195,8 +202,8 @@ struct lm78_data {
|
||||
};
|
||||
|
||||
|
||||
static int lm78_init(void);
|
||||
static int lm78_cleanup(void);
|
||||
static int __init lm78_init(void);
|
||||
static int __init lm78_cleanup(void);
|
||||
|
||||
static int lm78_attach_adapter(struct i2c_adapter *adapter);
|
||||
static int lm78_detect(struct i2c_adapter *adapter, int address, int kind);
|
||||
@@ -243,7 +250,7 @@ static struct i2c_driver lm78_driver = {
|
||||
};
|
||||
|
||||
/* Used by lm78_init/cleanup */
|
||||
static int lm78_initialized = 0;
|
||||
static int __init lm78_initialized = 0;
|
||||
|
||||
/* The /proc/sys entries */
|
||||
/* These files are created for each detected LM78. This is just a template;
|
||||
@@ -780,7 +787,7 @@ void lm78_fan_div(struct i2c_client *client, int operation, int ctl_name,
|
||||
}
|
||||
}
|
||||
|
||||
int lm78_init(void)
|
||||
int __init lm78_init(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -796,7 +803,7 @@ int lm78_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lm78_cleanup(void)
|
||||
int __init lm78_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -810,6 +817,7 @@ int lm78_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
|
||||
+13
-5
@@ -33,6 +33,13 @@
|
||||
#include "sensors.h"
|
||||
#include "compat.h"
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
|
||||
/* Addresses to scan */
|
||||
static unsigned short normal_i2c[] = {SENSORS_I2C_END};
|
||||
static unsigned short normal_i2c_range[] = {0x20,0x2f,SENSORS_I2C_END};
|
||||
@@ -190,8 +197,8 @@ struct lm80_data {
|
||||
};
|
||||
|
||||
|
||||
static int lm80_init(void);
|
||||
static int lm80_cleanup(void);
|
||||
static int __init lm80_init(void);
|
||||
static int __init lm80_cleanup(void);
|
||||
|
||||
static int lm80_attach_adapter(struct i2c_adapter *adapter);
|
||||
static int lm80_detect(struct i2c_adapter *adapter, int address, int kind);
|
||||
@@ -236,7 +243,7 @@ static struct i2c_driver lm80_driver = {
|
||||
};
|
||||
|
||||
/* Used by lm80_init/cleanup */
|
||||
static int lm80_initialized = 0;
|
||||
static int __init lm80_initialized = 0;
|
||||
|
||||
/* The /proc/sys entries */
|
||||
/* These files are created for each detected LM80. This is just a template;
|
||||
@@ -664,7 +671,7 @@ void lm80_fan_div(struct i2c_client *client, int operation, int ctl_name,
|
||||
}
|
||||
}
|
||||
|
||||
int lm80_init(void)
|
||||
int __init lm80_init(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -680,7 +687,7 @@ int lm80_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lm80_cleanup(void)
|
||||
int __init lm80_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -694,6 +701,7 @@ int lm80_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
|
||||
+13
-5
@@ -49,6 +49,13 @@
|
||||
#include "version.h"
|
||||
#include "compat.h"
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
|
||||
/* Addresses to scan */
|
||||
static unsigned short normal_i2c[] = {SENSORS_I2C_END};
|
||||
static unsigned short normal_i2c_range[] = {0x58,0x5a,SENSORS_I2C_END};
|
||||
@@ -81,8 +88,8 @@ extern int init_module(void);
|
||||
extern int cleanup_module(void);
|
||||
#endif /* MODULE */
|
||||
|
||||
static int ltc1710_init(void);
|
||||
static int ltc1710_cleanup(void);
|
||||
static int __init ltc1710_init(void);
|
||||
static int __init ltc1710_cleanup(void);
|
||||
static int ltc1710_attach_adapter(struct i2c_adapter *adapter);
|
||||
static int ltc1710_detect(struct i2c_adapter *adapter, int address, int kind);
|
||||
static int ltc1710_detach_client(struct i2c_client *client);
|
||||
@@ -123,7 +130,7 @@ static ctl_table ltc1710_dir_table_template[] = {
|
||||
};
|
||||
|
||||
/* Used by init/cleanup */
|
||||
static int ltc1710_initialized = 0;
|
||||
static int __init ltc1710_initialized = 0;
|
||||
|
||||
/* I choose here for semi-static LTC1710 allocation. Complete dynamic
|
||||
allocation could also be used; the code needed for this would probably
|
||||
@@ -347,7 +354,7 @@ void ltc1710_switch2(struct i2c_client *client, int operation, int ctl_name,
|
||||
}
|
||||
}
|
||||
|
||||
int ltc1710_init(void)
|
||||
int __init ltc1710_init(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -362,7 +369,7 @@ int ltc1710_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ltc1710_cleanup(void)
|
||||
int __init ltc1710_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -377,6 +384,7 @@ int ltc1710_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
|
||||
+13
-5
@@ -30,6 +30,13 @@
|
||||
#include "version.h"
|
||||
#include "compat.h"
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
|
||||
/* Addresses to scan */
|
||||
static unsigned short normal_i2c[] = {0x2E,SENSORS_I2C_END};
|
||||
static unsigned short normal_i2c_range[] = {SENSORS_I2C_END};
|
||||
@@ -57,8 +64,8 @@ extern int init_module(void);
|
||||
extern int cleanup_module(void);
|
||||
#endif /* MODULE */
|
||||
|
||||
static int matorb_init(void);
|
||||
static int matorb_cleanup(void);
|
||||
static int __init matorb_init(void);
|
||||
static int __init matorb_cleanup(void);
|
||||
static int matorb_attach_adapter(struct i2c_adapter *adapter);
|
||||
static int matorb_detect(struct i2c_adapter *adapter, int address, int kind);
|
||||
static void matorb_init_client(struct i2c_client *client);
|
||||
@@ -97,7 +104,7 @@ static ctl_table matorb_dir_table_template[] = {
|
||||
};
|
||||
|
||||
/* Used by init/cleanup */
|
||||
static int matorb_initialized = 0;
|
||||
static int __init matorb_initialized = 0;
|
||||
|
||||
/* I choose here for semi-static MATORB allocation. Complete dynamic
|
||||
allocation could also be used; the code needed for this would probably
|
||||
@@ -317,7 +324,7 @@ int i;
|
||||
}
|
||||
}
|
||||
|
||||
int matorb_init(void)
|
||||
int __init matorb_init(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -332,7 +339,7 @@ int matorb_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int matorb_cleanup(void)
|
||||
int __init matorb_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -347,6 +354,7 @@ int matorb_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
|
||||
+13
-5
@@ -51,6 +51,13 @@ static const char *version_str = "1.00 25/2/99 Fons Rademakers";
|
||||
#include "sensors.h"
|
||||
#include "compat.h"
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#undef AUTODETECT /* try to autodetect MaxiLife version */
|
||||
#define NOWRITE /* don't allow writing to MaxiLife registers */
|
||||
@@ -151,8 +158,8 @@ struct maxi_data {
|
||||
};
|
||||
|
||||
|
||||
static int maxi_init(void);
|
||||
static int maxi_cleanup(void);
|
||||
static int __init maxi_init(void);
|
||||
static int __init maxi_cleanup(void);
|
||||
|
||||
static int maxi_attach_adapter(struct i2c_adapter *adapter);
|
||||
static int maxi_detect_smbus(struct i2c_adapter *adapter);
|
||||
@@ -205,7 +212,7 @@ static struct i2c_driver maxi_driver = {
|
||||
};
|
||||
|
||||
/* Used by maxi_init/cleanup */
|
||||
static int maxi_initialized = 0;
|
||||
static int __init maxi_initialized = 0;
|
||||
|
||||
/* Default firmware version. Use module option "maxi_version"
|
||||
to set desired version. Auto detect is not yet working */
|
||||
@@ -709,7 +716,7 @@ void maxi_alarms(struct i2c_client *client, int operation, int ctl_name,
|
||||
}
|
||||
}
|
||||
|
||||
int maxi_init(void)
|
||||
int __init maxi_init(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -726,7 +733,7 @@ int maxi_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int maxi_cleanup(void)
|
||||
int __init maxi_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -740,6 +747,7 @@ int maxi_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
|
||||
+13
-5
@@ -38,6 +38,13 @@
|
||||
#include "sensors.h"
|
||||
#include "compat.h"
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
|
||||
/* Addresses to scan.
|
||||
Note that we can't determine the ISA address until we have initialized
|
||||
our module */
|
||||
@@ -175,8 +182,8 @@ struct sis5595_data {
|
||||
};
|
||||
|
||||
|
||||
static int sis5595_init(void);
|
||||
static int sis5595_cleanup(void);
|
||||
static int __init sis5595_init(void);
|
||||
static int __init sis5595_cleanup(void);
|
||||
|
||||
static int sis5595_attach_adapter(struct i2c_adapter *adapter);
|
||||
static int sis5595_detect(struct i2c_adapter *adapter, int address, int kind);
|
||||
@@ -224,7 +231,7 @@ static struct i2c_driver sis5595_driver = {
|
||||
};
|
||||
|
||||
/* Used by sis5595_init/cleanup */
|
||||
static int sis5595_initialized = 0;
|
||||
static int __init sis5595_initialized = 0;
|
||||
|
||||
/* The /proc/sys entries */
|
||||
/* These files are created for each detected SIS5595. This is just a template;
|
||||
@@ -705,7 +712,7 @@ void sis5595_fan_div(struct i2c_client *client, int operation, int ctl_name,
|
||||
}
|
||||
}
|
||||
|
||||
int sis5595_init(void)
|
||||
int __init sis5595_init(void)
|
||||
{
|
||||
int res,addr;
|
||||
|
||||
@@ -727,7 +734,7 @@ int sis5595_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sis5595_cleanup(void)
|
||||
int __init sis5595_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -741,6 +748,7 @@ int sis5595_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
|
||||
+12
-8
@@ -44,6 +44,12 @@
|
||||
#include "sensors.h"
|
||||
#include "compat.h"
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
/* RT Table support #defined so we can take it out if it gets bothersome */
|
||||
#define W83781D_RT 1
|
||||
|
||||
@@ -348,8 +354,8 @@ struct w83781d_data {
|
||||
};
|
||||
|
||||
|
||||
static int w83781d_init(void);
|
||||
static int w83781d_cleanup(void);
|
||||
static int __init w83781d_init(void);
|
||||
static int __init w83781d_cleanup(void);
|
||||
|
||||
static int w83781d_attach_adapter(struct i2c_adapter *adapter);
|
||||
static int w83781d_detect(struct i2c_adapter *adapter, int address, int kind);
|
||||
@@ -409,7 +415,7 @@ static struct i2c_driver w83781d_driver = {
|
||||
};
|
||||
|
||||
/* Used by w83781d_init/cleanup */
|
||||
static int w83781d_initialized = 0;
|
||||
static int __init w83781d_initialized = 0;
|
||||
|
||||
/* The /proc/sys entries */
|
||||
/* These files are created for each detected W83781D. This is just a template;
|
||||
@@ -1479,7 +1485,7 @@ void w83781d_rt(struct i2c_client *client, int operation, int ctl_name,
|
||||
}
|
||||
#endif
|
||||
|
||||
int w83781d_init(void)
|
||||
int __init w83781d_init(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -1495,7 +1501,7 @@ int w83781d_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int w83781d_cleanup(void)
|
||||
int __init w83781d_cleanup(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
@@ -1509,6 +1515,7 @@ int w83781d_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_NO_SYMBOLS;
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
@@ -1528,6 +1535,3 @@ int cleanup_module(void)
|
||||
|
||||
#endif /* MODULE */
|
||||
|
||||
|
||||
|
||||
|
||||
+20
-8
@@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/malloc.h>
|
||||
#include <linux/ctype.h>
|
||||
#include <linux/sysctl.h>
|
||||
@@ -30,10 +31,16 @@
|
||||
#include "sensors.h"
|
||||
#include "compat.h"
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,53)
|
||||
#include <linux/init.h>
|
||||
#else
|
||||
#define __init
|
||||
#endif
|
||||
|
||||
#ifdef MODULE
|
||||
extern int init_module(void);
|
||||
extern int cleanup_module(void);
|
||||
static int sensors_cleanup(void);
|
||||
#endif /* MODULE */
|
||||
|
||||
static int sensors_create_name(char **name, const char *prefix,
|
||||
@@ -48,8 +55,7 @@ static int sensors_sysctl_chips (ctl_table *table, int *name, int nlen,
|
||||
void *oldval, size_t *oldlenp, void *newval,
|
||||
size_t newlen, void **context);
|
||||
|
||||
static int sensors_init(void);
|
||||
static int sensors_cleanup(void);
|
||||
static int __init sensors_init(void);
|
||||
|
||||
#define SENSORS_ENTRY_MAX 20
|
||||
static struct ctl_table_header *sensors_entries[SENSORS_ENTRY_MAX];
|
||||
@@ -742,7 +748,7 @@ int sensors_detect(struct i2c_adapter *adapter,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sensors_init(void)
|
||||
int __init sensors_init(void)
|
||||
{
|
||||
printk("sensors.o version %s (%s)\n",LM_VERSION,LM_DATE);
|
||||
sensors_initialized = 0;
|
||||
@@ -755,6 +761,17 @@ int sensors_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(sensors_deregister_entry);
|
||||
EXPORT_SYMBOL(sensors_detect);
|
||||
EXPORT_SYMBOL(sensors_proc_real);
|
||||
EXPORT_SYMBOL(sensors_register_entry);
|
||||
EXPORT_SYMBOL(sensors_sysctl_real);
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>");
|
||||
MODULE_DESCRIPTION("LM78 driver");
|
||||
|
||||
int sensors_cleanup(void)
|
||||
{
|
||||
if (sensors_initialized >= 1) {
|
||||
@@ -764,11 +781,6 @@ int sensors_cleanup(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>");
|
||||
MODULE_DESCRIPTION("LM78 driver");
|
||||
|
||||
int init_module(void)
|
||||
{
|
||||
return sensors_init();
|
||||
|
||||
Reference in new issue
Block a user