summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schweizer <genstef@gentoo.org>2007-05-12 22:29:25 +0000
committerStefan Schweizer <genstef@gentoo.org>2007-05-12 22:29:25 +0000
commit7052955d37f18d8da88e4eecd405d953448a2c76 (patch)
treede64641ab721bfda17a4c3cc457b11a17e26c393 /app-laptop/acpi4asus/files
parentFix X and gdbm automagics (diff)
downloadgentoo-2-7052955d37f18d8da88e4eecd405d953448a2c76.tar.gz
gentoo-2-7052955d37f18d8da88e4eecd405d953448a2c76.tar.bz2
gentoo-2-7052955d37f18d8da88e4eecd405d953448a2c76.zip
Fix for kernel 2.6.21 thanks to Pacho Ramos <pacho@condmat1.ciencias.uniovi.es> in bug 177956
(Portage version: 2.1.2.7)
Diffstat (limited to 'app-laptop/acpi4asus/files')
-rw-r--r--app-laptop/acpi4asus/files/cvs.patch165
-rw-r--r--app-laptop/acpi4asus/files/digest-acpi4asus-0.413
2 files changed, 168 insertions, 0 deletions
diff --git a/app-laptop/acpi4asus/files/cvs.patch b/app-laptop/acpi4asus/files/cvs.patch
new file mode 100644
index 000000000000..0d13484e1f55
--- /dev/null
+++ b/app-laptop/acpi4asus/files/cvs.patch
@@ -0,0 +1,165 @@
+--- ../../acpi4asus-0.41/driver/asus-laptop.c 2007-05-05 16:57:34.000000000 +0200
++++ ./asus-laptop.c 2007-05-05 17:08:51.000000000 +0200
+@@ -3,7 +3,7 @@
+ *
+ *
+ * Copyright (C) 2002-2005 Julien Lerouge, 2003-2006 Karol Kozimor
+- * Copyright (C) 2006 Corentin Chary
++ * Copyright (C) 2006-2007 Corentin Chary
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+@@ -35,8 +35,8 @@
+
+ #include <linux/version.h>
+
+-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,19)
+-#warning "This module does not support 2.6.19"
++#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20)
++#warning "This module does not support 2.6.20"
+ #endif
+
+ #include <linux/autoconf.h>
+@@ -54,7 +54,7 @@
+ #include <acpi/acpi_bus.h>
+ #include <asm/uaccess.h>
+
+-#define ASUS_LAPTOP_VERSION "0.41"
++#define ASUS_LAPTOP_VERSION "0.42-cvs"
+
+ #define ASUS_HOTK_NAME "Asus Laptop Support"
+ #define ASUS_HOTK_CLASS "hotkey"
+@@ -222,11 +222,9 @@
+ */
+ static int read_brightness(struct backlight_device *bd);
+ static int update_bl_status(struct backlight_device *bd);
+-static struct backlight_properties asusbl_data = {
+- .owner = THIS_MODULE,
++static struct backlight_ops asusbl_ops = {
+ .get_brightness = read_brightness,
+ .update_status = update_bl_status,
+- .max_brightness = 15,
+ };
+
+ /* These functions actually update the LED's, and are called from a
+@@ -238,9 +236,9 @@
+ #define ASUS_LED(object, ledname) \
+ static void object##_led_set(struct led_classdev *led_cdev, \
+ enum led_brightness value); \
++ static void object##_led_update(struct work_struct *ignored); \
+ static int object##_led_wk; \
+- static void object##_led_update(struct work_struct *dummy); \
+- static DECLARE_WORK(object##_led_work, object##_led_update); \
++ static DECLARE_WORK(object##_led_work, object##_led_update); \
+ static struct led_classdev object##_led = { \
+ .name = "asus:" ledname, \
+ .brightness_set = object##_led_set, \
+@@ -326,7 +324,7 @@
+ out = !out & 0x1;
+ break;
+ case GLED_ON:
+- out += 1;
++ out = (out & 0x1) + 1;
+ break;
+ case GPS_ON:
+ handle = (out) ? gps_on_handle : gps_off_handle;
+@@ -349,7 +347,7 @@
+ object##_led_wk = value; \
+ queue_work(led_workqueue, &object##_led_work); \
+ } \
+- static void object##_led_update(struct work_struct *dummy) \
++ static void object##_led_update(struct work_struct *ignored) \
+ { \
+ int value = object##_led_wk; \
+ write_status(object##_set_handle, value, (mask)); \
+@@ -393,13 +391,8 @@
+ struct backlight_device *bd = asus_backlight_device;
+
+ if (bd) {
+- down(&bd->sem);
+- if (likely(bd->props)) {
+- bd->props->power = blank;
+- if (likely(bd->props->update_status))
+- bd->props->update_status(bd);
+- }
+- up(&bd->sem);
++ bd->props.power = blank;
++ backlight_update_status(bd);
+ }
+ }
+
+@@ -433,13 +426,13 @@
+ static int update_bl_status(struct backlight_device *bd)
+ {
+ int rv;
+- int value = bd->props->brightness;
++ int value = bd->props.brightness;
+
+ rv = set_brightness(bd, value);
+ if (rv)
+ return rv;
+
+- value = (bd->props->power == FB_BLANK_UNBLANK) ? 1 : 0;
++ value = (bd->props.power == FB_BLANK_UNBLANK) ? 1 : 0;
+ return set_lcd_state(value);
+ }
+
+@@ -850,7 +843,7 @@
+ static int asus_hotk_get_info(void)
+ {
+ struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
+- struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL };
++
+ union acpi_object *model = NULL;
+ ulong bsts_result, hwrs_result;
+ char *string = NULL;
+@@ -864,11 +857,9 @@
+ * HID), this bit will be moved. A global variable asus_info contains
+ * the DSDT header.
+ */
+- status = acpi_get_table(ACPI_TABLE_ID_DSDT, 1, &dsdt);
++ status = acpi_get_table(ACPI_SIG_DSDT, 1, &asus_info);
+ if (ACPI_FAILURE(status))
+ printk(ASUS_WARNING "Couldn't get the DSDT table header\n");
+- else
+- asus_info = dsdt.pointer;
+
+ /* We have to write 0 on init this far for all ASUS models */
+ if (!write_acpi_int(hotk->handle, "INIT", 0, &buffer)) {
+@@ -1107,8 +1098,6 @@
+ sysfs_remove_group(&asuspf_device->dev.kobj, &asuspf_attribute_group);
+ platform_device_unregister(asuspf_device);
+ platform_driver_unregister(&asuspf_driver);
+-
+- kfree(asus_info);
+ }
+
+ static int asus_backlight_init(struct device *dev)
+@@ -1117,7 +1106,7 @@
+
+ if (brightness_set_handle && lcd_switch_handle) {
+ bd = backlight_device_register(ASUS_HOTK_FILE, dev,
+- NULL, &asusbl_data);
++ NULL, &asusbl_ops);
+
+ if (IS_ERR(bd)) {
+ printk(ASUS_ERR
+@@ -1128,14 +1117,10 @@
+
+ asus_backlight_device = bd;
+
+- down(&bd->sem);
+- if (likely(bd->props)) {
+- bd->props->brightness = read_brightness(NULL);
+- bd->props->power = FB_BLANK_UNBLANK;
+- if (likely(bd->props->update_status))
+- bd->props->update_status(bd);
+- }
+- up(&bd->sem);
++ bd->props.max_brightness = 15;
++ bd->props.brightness = read_brightness(NULL);
++ bd->props.power = FB_BLANK_UNBLANK;
++ backlight_update_status(bd);
+ }
+ return 0;
+ }
diff --git a/app-laptop/acpi4asus/files/digest-acpi4asus-0.41 b/app-laptop/acpi4asus/files/digest-acpi4asus-0.41
new file mode 100644
index 000000000000..81e525d57e1f
--- /dev/null
+++ b/app-laptop/acpi4asus/files/digest-acpi4asus-0.41
@@ -0,0 +1,3 @@
+MD5 2b88f79ea714987189105193aff9a52f acpi4asus-0.41.tar.bz2 29958
+RMD160 deb610db482dcab1d81425c8def8ec5851aa34b7 acpi4asus-0.41.tar.bz2 29958
+SHA256 f63b8d9f0c259e66988c436faeb5481781a016f3cb796e4995ab966514fa2e24 acpi4asus-0.41.tar.bz2 29958