diff options
author | Stefan Schweizer <genstef@gentoo.org> | 2007-05-12 22:29:25 +0000 |
---|---|---|
committer | Stefan Schweizer <genstef@gentoo.org> | 2007-05-12 22:29:25 +0000 |
commit | 7052955d37f18d8da88e4eecd405d953448a2c76 (patch) | |
tree | de64641ab721bfda17a4c3cc457b11a17e26c393 | |
parent | Fix X and gdbm automagics (diff) | |
download | gentoo-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)
-rw-r--r-- | app-laptop/acpi4asus/ChangeLog | 9 | ||||
-rw-r--r-- | app-laptop/acpi4asus/acpi4asus-0.41.ebuild | 63 | ||||
-rw-r--r-- | app-laptop/acpi4asus/files/cvs.patch | 165 | ||||
-rw-r--r-- | app-laptop/acpi4asus/files/digest-acpi4asus-0.41 | 3 |
4 files changed, 239 insertions, 1 deletions
diff --git a/app-laptop/acpi4asus/ChangeLog b/app-laptop/acpi4asus/ChangeLog index b8ebe6f6d8ad..678b40e554b9 100644 --- a/app-laptop/acpi4asus/ChangeLog +++ b/app-laptop/acpi4asus/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for app-laptop/acpi4asus # Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-laptop/acpi4asus/ChangeLog,v 1.14 2007/04/07 13:26:15 genstef Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-laptop/acpi4asus/ChangeLog,v 1.15 2007/05/12 22:29:25 genstef Exp $ + +*acpi4asus-0.41 (12 May 2007) + + 12 May 2007; Stefan Schweizer <genstef@gentoo.org> +files/cvs.patch, + +acpi4asus-0.41.ebuild: + Fix for kernel 2.6.21 thanks to Pacho Ramos + <pacho@condmat1.ciencias.uniovi.es> in bug 177956 22 Mar 2007; Stefan Schweizer <genstef@gentoo.org> +acpi4asus-0.40-r1.ebuild: change emake command thanks CHARY Corentin <corentincj@iksaif.net> in bug diff --git a/app-laptop/acpi4asus/acpi4asus-0.41.ebuild b/app-laptop/acpi4asus/acpi4asus-0.41.ebuild new file mode 100644 index 000000000000..bfafc659b6c0 --- /dev/null +++ b/app-laptop/acpi4asus/acpi4asus-0.41.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-laptop/acpi4asus/acpi4asus-0.41.ebuild,v 1.1 2007/05/12 22:29:25 genstef Exp $ + +inherit linux-mod eutils + +DESCRIPTION="Acpi daemon and kernel module to control ASUS Laptop Hotkeys" +HOMEPAGE="http://sourceforge.net/projects/acpi4asus" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" +MODULE_NAMES="asus-laptop(acpi:${S}/driver)" +BUILD_TARGETS=" " +RDEPEND="sys-power/acpid" +CONFIG_CHECK="LEDS_CLASS" + +pkg_setup() { + linux-mod_pkg_setup + BUILD_PARAMS="KDIR=${KV_DIR}" +} + +src_unpack() { + unpack ${A} + + if kernel_is ge 2 6 21 ; then + epatch ${FILESDIR}/cvs.patch + fi +} + +src_compile() { + linux-mod_src_compile + emake -C asus_acpid +} + + +src_install() { + linux-mod_src_install + + dobin asus_acpid/asus_acpid + doman asus_acpid/asus_acpid.8 + + dodoc README Changelog + + dodir /usr/share/${PN}/samples + + dodir /usr/share/${PN}/samples/actions + insinto /usr/share/${PN}/samples/actions + doins samples/actions/*.sh + + dodir /usr/share/${PN}/samples/events + insinto /usr/share/${PN}/samples/events + doins samples/events/* +} + +pkg_postinst() { + linux-mod_pkg_postinst + einfo + einfo "Don't forget to create your ~/.asus_acpi," + einfo "see /usr/share/doc/${PF}/README.gz for details" + einfo +} 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 |