Changeset 2423

Show
Ignore:
Timestamp:
04/07/04 20:36:19 (5 years ago)
Author:
khali
Message:

Move IBM detection into dmi_scan.c.

Delete dmi_scan.h, now useless.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/kernel/busses/dmi_scan.c

    r1931 r2423  
    1717#include <asm/system.h> 
    1818#include "version.h" 
    19 #include "dmi_scan.h" 
     19 
     20int is_unsafe_smbus; 
     21EXPORT_SYMBOL(is_unsafe_smbus); 
    2022 
    2123struct dmi_header 
     
    2426        u8      length; 
    2527        u16     handle; 
     28}; 
     29 
     30enum 
     31{ 
     32        DMI_BIOS_VENDOR, 
     33        DMI_BIOS_VERSION, 
     34        DMI_BIOS_DATE, 
     35        DMI_SYS_VENDOR, 
     36        DMI_PRODUCT_NAME, 
     37        DMI_PRODUCT_VERSION, 
     38        DMI_BOARD_VENDOR, 
     39        DMI_BOARD_NAME, 
     40        DMI_BOARD_VERSION, 
     41        DMI_STRING_MAX 
    2642}; 
    2743 
     
    212228} 
    213229 
    214 void __init dmi_scan_mach(void) 
     230int __init dmi_scan_mach(void) 
    215231{ 
    216232        int err; 
     
    221237        else 
    222238                printk("dmi_scan.o: SM BIOS found\n"); 
     239 
     240        if(dmi_ident[DMI_SYS_VENDOR] != NULL 
     241        && strncmp(dmi_ident[DMI_SYS_VENDOR], "IBM", 3) == 0) 
     242                is_unsafe_smbus = 1; 
     243        return 0; 
    223244} 
    224245 
    225246MODULE_DESCRIPTION("SM BIOS DMI Scanner"); 
    226247MODULE_LICENSE("GPL"); 
    227 EXPORT_SYMBOL(dmi_ident); 
    228 EXPORT_SYMBOL(dmi_scan_mach); 
     248 
     249module_init(dmi_scan_mach); 
  • lm-sensors/trunk/kernel/busses/i2c-piix4.c

    r2248 r2423  
    4242#include <asm/io.h> 
    4343#include "version.h" 
    44 #include "dmi_scan.h" 
    4544 
    4645 
     
    117116 * Get DMI information. 
    118117 */ 
    119 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,34) 
    120 void dmi_scan_mach(void); 
    121 #endif 
    122118 
    123119static int __devinit ibm_dmi_probe(void) 
    124120{ 
    125 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,34) 
    126121        extern int is_unsafe_smbus; 
    127122        return is_unsafe_smbus; 
    128 #else 
    129 #define IBM_SIGNATURE           "IBM" 
    130         dmi_scan_mach(); 
    131         if(dmi_ident[DMI_SYS_VENDOR] == NULL) 
    132                 return 0; 
    133         if(strncmp(dmi_ident[DMI_SYS_VENDOR], IBM_SIGNATURE, 
    134                    strlen(IBM_SIGNATURE)) == 0) 
    135                 return 1; 
    136         return 0; 
    137 #endif 
    138123} 
    139124#endif 
  • lm-sensors/trunk/mkpatch/FILES

    r2241 r2423  
    11kernel/busses/dmi_scan.c        drivers/i2c/dmi_scan.c 
    2 kernel/busses/dmi_scan.h        include/linux/dmi_scan.h 
    32kernel/busses/i2c-ali1535.c     drivers/i2c/i2c-ali1535.c 
    43kernel/busses/i2c-ali15x3.c     drivers/i2c/i2c-ali15x3.c 
  • lm-sensors/trunk/mkpatch/INCLUDES

    r1810 r2423  
    1 "dmi_scan.h"            <linux/dmi_scan.h> 
    21"sensors_compat.h"      <linux/sensors_compat.h> 
    32"sensors_vid.h"         <linux/sensors_vid.h>