mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-02 13:30:30 +00:00
Move IBM detection into dmi_scan.c.
Delete dmi_scan.h, now useless. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2423 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
89749d347b
commit
af741a7b4d
5 files changed
+25
-36
No files matched your search
@@ -16,7 +16,9 @@
|
||||
#include <asm/keyboard.h>
|
||||
#include <asm/system.h>
|
||||
#include "version.h"
|
||||
#include "dmi_scan.h"
|
||||
|
||||
int is_unsafe_smbus;
|
||||
EXPORT_SYMBOL(is_unsafe_smbus);
|
||||
|
||||
struct dmi_header
|
||||
{
|
||||
@@ -25,6 +27,20 @@ struct dmi_header
|
||||
u16 handle;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
DMI_BIOS_VENDOR,
|
||||
DMI_BIOS_VERSION,
|
||||
DMI_BIOS_DATE,
|
||||
DMI_SYS_VENDOR,
|
||||
DMI_PRODUCT_NAME,
|
||||
DMI_PRODUCT_VERSION,
|
||||
DMI_BOARD_VENDOR,
|
||||
DMI_BOARD_NAME,
|
||||
DMI_BOARD_VERSION,
|
||||
DMI_STRING_MAX
|
||||
};
|
||||
|
||||
#define dmi_printk(x)
|
||||
//#define dmi_printk(x) printk x
|
||||
|
||||
@@ -211,7 +227,7 @@ static void __init dmi_decode(struct dmi_header *dm)
|
||||
}
|
||||
}
|
||||
|
||||
void __init dmi_scan_mach(void)
|
||||
int __init dmi_scan_mach(void)
|
||||
{
|
||||
int err;
|
||||
printk("dmi_scan.o version %s (%s)\n", LM_VERSION, LM_DATE);
|
||||
@@ -220,9 +236,14 @@ void __init dmi_scan_mach(void)
|
||||
printk("dmi_scan.o: SM BIOS not found\n");
|
||||
else
|
||||
printk("dmi_scan.o: SM BIOS found\n");
|
||||
|
||||
if(dmi_ident[DMI_SYS_VENDOR] != NULL
|
||||
&& strncmp(dmi_ident[DMI_SYS_VENDOR], "IBM", 3) == 0)
|
||||
is_unsafe_smbus = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
MODULE_DESCRIPTION("SM BIOS DMI Scanner");
|
||||
MODULE_LICENSE("GPL");
|
||||
EXPORT_SYMBOL(dmi_ident);
|
||||
EXPORT_SYMBOL(dmi_scan_mach);
|
||||
|
||||
module_init(dmi_scan_mach);
|
||||
@@ -1,15 +0,0 @@
|
||||
enum
|
||||
{
|
||||
DMI_BIOS_VENDOR,
|
||||
DMI_BIOS_VERSION,
|
||||
DMI_BIOS_DATE,
|
||||
DMI_SYS_VENDOR,
|
||||
DMI_PRODUCT_NAME,
|
||||
DMI_PRODUCT_VERSION,
|
||||
DMI_BOARD_VENDOR,
|
||||
DMI_BOARD_NAME,
|
||||
DMI_BOARD_VERSION,
|
||||
DMI_STRING_MAX
|
||||
};
|
||||
|
||||
extern char *dmi_ident[DMI_STRING_MAX];
|
||||
@@ -41,7 +41,6 @@
|
||||
#include <linux/apm_bios.h>
|
||||
#include <asm/io.h>
|
||||
#include "version.h"
|
||||
#include "dmi_scan.h"
|
||||
|
||||
|
||||
struct sd {
|
||||
@@ -116,25 +115,11 @@ static unsigned short piix4_smba = 0;
|
||||
/*
|
||||
* Get DMI information.
|
||||
*/
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,34)
|
||||
void dmi_scan_mach(void);
|
||||
#endif
|
||||
|
||||
static int __devinit ibm_dmi_probe(void)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,34)
|
||||
extern int is_unsafe_smbus;
|
||||
return is_unsafe_smbus;
|
||||
#else
|
||||
#define IBM_SIGNATURE "IBM"
|
||||
dmi_scan_mach();
|
||||
if(dmi_ident[DMI_SYS_VENDOR] == NULL)
|
||||
return 0;
|
||||
if(strncmp(dmi_ident[DMI_SYS_VENDOR], IBM_SIGNATURE,
|
||||
strlen(IBM_SIGNATURE)) == 0)
|
||||
return 1;
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
kernel/busses/dmi_scan.c drivers/i2c/dmi_scan.c
|
||||
kernel/busses/dmi_scan.h include/linux/dmi_scan.h
|
||||
kernel/busses/i2c-ali1535.c drivers/i2c/i2c-ali1535.c
|
||||
kernel/busses/i2c-ali15x3.c drivers/i2c/i2c-ali15x3.c
|
||||
kernel/busses/i2c-amd756.c drivers/i2c/i2c-amd756.c
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
"dmi_scan.h" <linux/dmi_scan.h>
|
||||
"sensors_compat.h" <linux/sensors_compat.h>
|
||||
"sensors_vid.h" <linux/sensors_vid.h>
|
||||
Reference in new issue
Block a user