mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-23 20:11:42 +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
+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 */
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user