From: akpm-3NddpPZAyC0@public.gmane.org
To: len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
akpm-3NddpPZAyC0@public.gmane.org,
pavel-+ZI9xUNit7I@public.gmane.org
Subject: [patch 06/12] ACPI: report errors in fan.c
Date: Wed, 23 Feb 2005 01:53:04 -0800 [thread overview]
Message-ID: <200502230953.j1N9rIwN020705@shell0.pdx.osdl.net> (raw)
From: Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>
Currently, fan.c ignores errors from acpi_bus_get_power. On compaq evo
notebook that leads to very confusing empty output.
Signed-off-by: Andrew Morton <akpm-3NddpPZAyC0@public.gmane.org>
---
25-akpm/drivers/acpi/fan.c | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
diff -puN drivers/acpi/fan.c~acpi-report-errors-in-fanc drivers/acpi/fan.c
--- 25/drivers/acpi/fan.c~acpi-report-errors-in-fanc 2005-02-23 01:48:03.000000000 -0800
+++ 25-akpm/drivers/acpi/fan.c 2005-02-23 01:48:03.000000000 -0800
@@ -78,21 +78,18 @@ struct proc_dir_entry *acpi_fan_dir;
static int
acpi_fan_read_state (struct seq_file *seq, void *offset)
{
- struct acpi_fan *fan = (struct acpi_fan *) seq->private;
+ struct acpi_fan *fan = seq->private;
int state = 0;
ACPI_FUNCTION_TRACE("acpi_fan_read_state");
- if (!fan)
- goto end;
-
- if (acpi_bus_get_power(fan->handle, &state))
- goto end;
-
- seq_printf(seq, "status: %s\n",
- !state?"on":"off");
-
-end:
+ if (fan) {
+ if (acpi_bus_get_power(fan->handle, &state))
+ seq_printf(seq, "status: ERROR\n");
+ else
+ seq_printf(seq, "status: %s\n",
+ !state?"on":"off");
+ }
return_VALUE(0);
}
_
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
next reply other threads:[~2005-02-23 9:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-23 9:53 akpm-3NddpPZAyC0 [this message]
[not found] ` <200502230953.j1N9rIwN020705-bipKiLWnuIsyyg0EjBt7GtHuzzzSOjJt@public.gmane.org>
2005-03-02 18:56 ` [patch 06/12] ACPI: report errors in fan.c Len Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200502230953.j1N9rIwN020705@shell0.pdx.osdl.net \
--to=akpm-3nddppzayc0@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=pavel-+ZI9xUNit7I@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.