From 0cef436a48aebcdd2ea4eb6e2fb61a227008b88e Mon Sep 17 00:00:00 2001 From: Carlos Corbacho Date: Tue, 5 Feb 2008 21:44:31 +0000 Subject: [PATCH] wmi-acer - Fix for SuSE 2.6.22 kernels (OpenSuSE 10.3) OpenSuSE broke the WMI module because they backported the ACPI autoload modules to their 2.6.22 kernel. Fix wmi-acer preprocesser tests to handle this odd case. --- wmi-acer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wmi-acer.c b/wmi-acer.c index 637ae1f..7b311b5 100644 --- a/wmi-acer.c +++ b/wmi-acer.c @@ -110,7 +110,8 @@ MODULE_PARM_DESC(debug, "Debugging verbosity level (0=least 2=most)"); static int acpi_wmi_remove(struct acpi_device *device, int type); static int acpi_wmi_add(struct acpi_device *device); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)) || \ +(defined(CONFIG_SUSE_KERNEL) && LINUX_VERSION_CODE == KERNEL_VERSION(2,6,22)) const static struct acpi_device_id wmi_device_ids[] = { {"PNP0C14", 0}, {"pnp0c14", 0}, @@ -122,7 +123,8 @@ MODULE_DEVICE_TABLE(acpi, wmi_device_ids); static struct acpi_driver acpi_wmi_driver = { .name = "wmi-acer", .class = ACPI_WMI_CLASS, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)) || \ +(defined(CONFIG_SUSE_KERNEL) && LINUX_VERSION_CODE == KERNEL_VERSION(2,6,22)) .ids = wmi_device_ids, #else .ids = "PNP0C14,pnp0c14", -- 2.11.4.GIT