Toshiba ACPI Extras 0.15
PATCH 1/1 Toshiba ACPI Extras 0.15
Hello Andy,
This is a patch for version 0.15 of my driver. Please apply it to both the 2.5 and 2.4 trees.
Changes:
* Workaround sporatic problem on some machines where hotkey status stops working
* Minor cleanup
Regards,
-John
Signature · 1 line
http:// if l .o /
toshiba_acpi.c renamed from toshiba_acpi.c.old +7 -8
@@ -33,7 +33,7 @@* */ -#define TOSHIBA_ACPI_VERSION "0.14" +#define TOSHIBA_ACPI_VERSION "0.15"#define PROC_INTERFACE_VERSION 1#include <linux/kernel.h>
@@ -172,9 +172,7 @@for (i =0 ; i <HCI_WORDS ; ++i) { in_objs[i].type =ACPI_TYPE_INTEGER ; in_objs[i].integer.value = in[i]; -/*printk("%04x ", in[i]);*/ } -/*printk("\n");*/ results.length =sizeof (out_objs); results.pointer = out_objs;
@@ -184,9 +182,7 @@if ((status ==AE_OK ) && (out_objs->package.count <=HCI_WORDS )) {for (i =0 ; i < out_objs->package.count; ++i) { out[i] = out_objs->package.elements[i].integer.value; -/*printk("%04x ", out[i]);*/ } -/*printk("\n");*/ }return status;
@@ -226,7 +222,7 @@typedef struct _ProcItem { -char * name; +const char * name;char * (*read_func)(char *);unsigned long (*write_func)(const char *,unsigned long ); }ProcItem ;
@@ -284,10 +280,8 @@ write_lcd(const char* buffer, unsigned long count) { int value; -/*int byte_count;*/ u32 hci_result; -/* ISSUE: %i doesn't work with hex values as advertised */ if (snscanf (buffer, count," brightness : %i" , &value) ==1 && value >=0 && value <HCI_LCD_BRIGHTNESS_LEVELS ) { value = value <<HCI_LCD_BRIGHTNESS_SHIFT ;
@@ -414,6 +408,11 @@ last_key_event = value; }else if (hci_result ==HCI_EMPTY ) {/* better luck next time */ + }else if (hci_result ==HCI_NOT_SUPPORTED ) { +/* This is a workaround for an unresolved issue on +* some machines where system events sporadically +* become disabled. */ +hci_write1 (HCI_SYSTEM_EVENT ,1 , &hci_result); }else { p +=sprintf (p,"ERROR\n" ); goto end;