Commit 0afbfb45 authored by Andrey Panin's avatar Andrey Panin Committed by Linus Torvalds

[PATCH] dmi_scan: port sonypi driver to new DMI probing

This patch ports sonypi driver to new DMI probing API and removes
is_sony_vaio_laptop global variable.
Signed-off-by: default avatarAndrey Panin <pazke@donpac.ru>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b490da14
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
unsigned long dmi_broken; unsigned long dmi_broken;
EXPORT_SYMBOL(dmi_broken); EXPORT_SYMBOL(dmi_broken);
int is_sony_vaio_laptop;
int is_unsafe_smbus; int is_unsafe_smbus;
int es7000_plat = 0; int es7000_plat = 0;
...@@ -336,24 +335,6 @@ static __init int broken_apm_power(struct dmi_blacklist *d) ...@@ -336,24 +335,6 @@ static __init int broken_apm_power(struct dmi_blacklist *d)
return 0; return 0;
} }
/*
* Check for a Sony Vaio system
*
* On a Sony system we want to enable the use of the sonypi
* driver for Sony-specific goodies like the camera and jogdial.
* We also want to avoid using certain functions of the PnP BIOS.
*/
static __init int sony_vaio_laptop(struct dmi_blacklist *d)
{
if (is_sony_vaio_laptop == 0)
{
is_sony_vaio_laptop = 1;
printk(KERN_INFO "%s laptop detected.\n", d->ident);
}
return 0;
}
/* /*
* This bios swaps the APM minute reporting bytes over (Many sony laptops * This bios swaps the APM minute reporting bytes over (Many sony laptops
* have this problem). * have this problem).
...@@ -639,11 +620,6 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={ ...@@ -639,11 +620,6 @@ static __initdata struct dmi_blacklist dmi_blacklist[]={
MATCH(DMI_BIOS_VERSION, "0AASNP05"), MATCH(DMI_BIOS_VERSION, "0AASNP05"),
NO_MATCH, NO_MATCH, NO_MATCH, NO_MATCH,
} }, } },
{ sony_vaio_laptop, "Sony Vaio", { /* This is a Sony Vaio laptop */
MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
MATCH(DMI_PRODUCT_NAME, "PCG-"),
NO_MATCH, NO_MATCH,
} },
{ swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-N505X(DE) */ { swab_apm_power_in_minutes, "Sony VAIO", { /* Handle problems with APM on Sony Vaio PCG-N505X(DE) */
MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
MATCH(DMI_BIOS_VERSION, "R0206H"), MATCH(DMI_BIOS_VERSION, "R0206H"),
......
...@@ -187,9 +187,6 @@ EXPORT_SYMBOL_NOVERS(memcmp); ...@@ -187,9 +187,6 @@ EXPORT_SYMBOL_NOVERS(memcmp);
EXPORT_SYMBOL(atomic_dec_and_lock); EXPORT_SYMBOL(atomic_dec_and_lock);
#endif #endif
extern int is_sony_vaio_laptop;
EXPORT_SYMBOL(is_sony_vaio_laptop);
EXPORT_SYMBOL(__PAGE_KERNEL); EXPORT_SYMBOL(__PAGE_KERNEL);
#ifdef CONFIG_HIGHMEM #ifdef CONFIG_HIGHMEM
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/wait.h> #include <linux/wait.h>
#include <linux/acpi.h> #include <linux/acpi.h>
#include <linux/dmi.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -820,10 +821,21 @@ static void __devexit sonypi_remove(void) { ...@@ -820,10 +821,21 @@ static void __devexit sonypi_remove(void) {
printk(KERN_INFO "sonypi: removed.\n"); printk(KERN_INFO "sonypi: removed.\n");
} }
static int __init sonypi_init_module(void) { static struct dmi_system_id __initdata sonypi_dmi_table[] = {
struct pci_dev *pcidev = NULL; {
.ident = "Sony Vaio",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
DMI_MATCH(DMI_PRODUCT_NAME, "PCG-"),
},
},
{ }
};
if (is_sony_vaio_laptop) { static int __init sonypi_init_module(void)
{
struct pci_dev *pcidev = NULL;
if (dmi_check_system(sonypi_dmi_table)) {
pcidev = pci_find_device(PCI_VENDOR_ID_INTEL, pcidev = pci_find_device(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_82371AB_3, PCI_DEVICE_ID_INTEL_82371AB_3,
NULL); NULL);
......
...@@ -466,7 +466,6 @@ void disable_hlt(void); ...@@ -466,7 +466,6 @@ void disable_hlt(void);
void enable_hlt(void); void enable_hlt(void);
extern unsigned long dmi_broken; extern unsigned long dmi_broken;
extern int is_sony_vaio_laptop;
extern int es7000_plat; extern int es7000_plat;
#define BROKEN_ACPI_Sx 0x0001 #define BROKEN_ACPI_Sx 0x0001
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment