From: Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>
To: Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
ACPI mailing list
<acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: acpi: sleep/proc.c cleanups
Date: Sat, 19 Mar 2005 12:06:57 +0100 [thread overview]
Message-ID: <20050319110657.GA1530@elf.ucw.cz> (raw)
Hi!
This removes strange constructs and makes code shorter/clearer. Please
apply,
Pavel
Signed-off-by: Pavel Machek <pavel-AlSwsSmVLrQ@public.gmane.org>
--- clean/drivers/acpi/sleep/proc.c 2005-01-12 11:07:39.000000000 +0100
+++ linux/drivers/acpi/sleep/proc.c 2005-01-12 11:20:13.000000000 +0100
@@ -372,14 +368,10 @@
if (!dev->wakeup.flags.valid)
continue;
spin_unlock(&acpi_device_lock);
- if (dev->wakeup.flags.run_wake)
- seq_printf(seq, "%4s %4d %8s\n",
- dev->pnp.bus_id, (u32) dev->wakeup.sleep_state,
- dev->wakeup.state.enabled ? "*enabled" : "*disabled");
- else
- seq_printf(seq, "%4s %4d %8s\n",
- dev->pnp.bus_id, (u32) dev->wakeup.sleep_state,
- dev->wakeup.state.enabled ? "enabled" : "disabled");
+ seq_printf(seq, "%4s %4d %s%8s\n",
+ dev->pnp.bus_id, (u32) dev->wakeup.sleep_state,
+ dev->wakeup.flags.run_wake ? "*" : "",
+ dev->wakeup.state.enabled ? "enabled" : "disabled");
spin_lock(&acpi_device_lock);
}
spin_unlock(&acpi_device_lock);
@@ -413,7 +405,7 @@
continue;
if (!strncmp(dev->pnp.bus_id, str, 4)) {
- dev->wakeup.state.enabled = dev->wakeup.state.enabled ? 0:1;
+ dev->wakeup.state.enabled = !dev->wakeup.state.enabled;
found_dev = dev;
break;
}
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-------------------------------------------------------
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-03-19 11:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-19 11:06 Pavel Machek [this message]
[not found] ` <20050319110657.GA1530-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2005-03-19 22:31 ` acpi: sleep/proc.c cleanups Stefan Seyfried
[not found] ` <20050319223115.GC29495-l0tNAEGuAhhzZ8+rp42Dbp9+tswZ0GTaehPwdyo5hKaELgA04lAiVw@public.gmane.org>
2005-03-31 14:27 ` Pavel Machek
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=20050319110657.GA1530@elf.ucw.cz \
--to=pavel-+zi9xunit7i@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=len.brown-ral2JQCrhuEAvxtiuMwx3w@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox