mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-12-05 22:08:19 +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
+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
|
||||
|
||||
|
||||
Reference in new issue
Block a user