diff options
| author | Greg Kroah-Hartman <greg@kroah.com> | 2003-03-12 20:16:52 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2003-03-12 20:16:52 -0800 |
| commit | 1464d8c7d4c095cd21f745ef3c07ea71a75b7fd4 (patch) | |
| tree | 1c6a5a10471e5aa22c551816206b88e5082983f7 | |
| parent | 48ff60a2aecfa6d59d66119fd4a0335b39663c02 (diff) | |
i2c: i2c-piix4.c: Clean up the ibm dma scan logic
Also export the is_unsafe_smbus variable, which is needed.
| -rw-r--r-- | arch/i386/kernel/dmi_scan.c | 3 | ||||
| -rw-r--r-- | drivers/i2c/busses/i2c-piix4.c | 20 |
2 files changed, 5 insertions, 18 deletions
diff --git a/arch/i386/kernel/dmi_scan.c b/arch/i386/kernel/dmi_scan.c index 179579a1df20..6f755378def8 100644 --- a/arch/i386/kernel/dmi_scan.c +++ b/arch/i386/kernel/dmi_scan.c @@ -3,6 +3,7 @@ #include <linux/kernel.h> #include <linux/string.h> #include <linux/init.h> +#include <linux/module.h> #include <linux/apm_bios.h> #include <linux/slab.h> #include <asm/io.h> @@ -893,3 +894,5 @@ void __init dmi_scan_machine(void) if(err == 0) dmi_check_blacklist(); } + +EXPORT_SYMBOL(is_unsafe_smbus); diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c index 7121e2b27e45..76f9ead0b0a8 100644 --- a/drivers/i2c/busses/i2c-piix4.c +++ b/drivers/i2c/busses/i2c-piix4.c @@ -28,7 +28,6 @@ Note: we assume there can only be one device, with one SMBus interface. */ -#include <linux/version.h> #include <linux/module.h> #include <linux/config.h> #include <linux/pci.h> @@ -104,31 +103,18 @@ static int piix4_transaction(void); static unsigned short piix4_smba = 0; -#ifdef CONFIG_X86 /* * Get DMI information. */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,34) -void dmi_scan_mach(void); -#endif - -static int __init ibm_dmi_probe(void) +static int ibm_dmi_probe(void) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,34) +#ifdef CONFIG_X86 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 static int piix4_setup(struct pci_dev *PIIX4_dev, const struct pci_device_id *id) { @@ -141,7 +127,6 @@ static int piix4_setup(struct pci_dev *PIIX4_dev, const struct pci_device_id *id printk(KERN_INFO "i2c-piix4.o: Found %s device\n", PIIX4_dev->dev.name); -#ifdef CONFIG_X86 if(ibm_dmi_probe()) { printk (KERN_ERR "i2c-piix4.o: IBM Laptop detected; this module may corrupt\n"); @@ -150,7 +135,6 @@ static int piix4_setup(struct pci_dev *PIIX4_dev, const struct pci_device_id *id error_return = -EPERM; goto END; } -#endif /* Determine the address of the SMBus areas */ if (force_addr) { |
