public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* acpi: sleep/proc.c cleanups
@ 2005-03-19 11:06 Pavel Machek
       [not found] ` <20050319110657.GA1530-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2005-03-19 11:06 UTC (permalink / raw)
  To: Len Brown, ACPI mailing list

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-03-31 14:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-19 11:06 acpi: sleep/proc.c cleanups Pavel Machek
     [not found] ` <20050319110657.GA1530-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2005-03-19 22:31   ` Stefan Seyfried
     [not found]     ` <20050319223115.GC29495-l0tNAEGuAhhzZ8+rp42Dbp9+tswZ0GTaehPwdyo5hKaELgA04lAiVw@public.gmane.org>
2005-03-31 14:27       ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox