* [PATCH 06/15] asus_acpi: Invert read of wled proc file to show correct state of LED.
@ 2006-01-04 22:00 Ben Collins
0 siblings, 0 replies; only message in thread
From: Ben Collins @ 2006-01-04 22:00 UTC (permalink / raw)
To: linux-kernel
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
---
drivers/acpi/asus_acpi.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
4d2e320add8e00550bae442d12e9c980310076a9
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
index fec895a..20e53c4 100644
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -490,13 +490,13 @@ proc_read_info(char *page, char **start,
*/
/* Generic LED functions */
-static int read_led(const char *ledname, int ledmask)
+static int read_led(const char *ledname, int ledmask, int invert)
{
if (ledname) {
int led_status;
if (read_acpi_int(NULL, ledname, &led_status))
- return led_status;
+ return (invert) ? !led_status : led_status;
else
printk(KERN_WARNING "Asus ACPI: Error reading LED "
"status\n");
@@ -552,7 +552,7 @@ proc_read_mled(char *page, char **start,
void *data)
{
return sprintf(page, "%d\n",
- read_led(hotk->methods->mled_status, MLED_ON));
+ read_led(hotk->methods->mled_status, MLED_ON, 0));
}
static int
@@ -570,7 +570,7 @@ proc_read_wled(char *page, char **start,
void *data)
{
return sprintf(page, "%d\n",
- read_led(hotk->methods->wled_status, WLED_ON));
+ read_led(hotk->methods->wled_status, WLED_ON, 1));
}
static int
@@ -588,7 +588,7 @@ proc_read_tled(char *page, char **start,
void *data)
{
return sprintf(page, "%d\n",
- read_led(hotk->methods->tled_status, TLED_ON));
+ read_led(hotk->methods->tled_status, TLED_ON, 0));
}
static int
--
1.0.5
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-01-04 22:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-04 22:00 [PATCH 06/15] asus_acpi: Invert read of wled proc file to show correct state of LED Ben Collins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®