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

* Re: acpi: sleep/proc.c cleanups
       [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>
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Seyfried @ 2005-03-19 22:31 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Sat, Mar 19, 2005 at 12:06:57PM +0100, Pavel Machek wrote:

> --- 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

> +		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");

Oh, now that i read this... :-)

What is the difference beteen "*enabled" and "enabled"? I noticed it today
when trying to get my Armada E500 to wake-on-lan from S3. So what is
wakeup.flags.run_wake?
-- 
Stefan Seyfried



-------------------------------------------------------
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

* Re: Re: acpi: sleep/proc.c cleanups
       [not found]     ` <20050319223115.GC29495-l0tNAEGuAhhzZ8+rp42Dbp9+tswZ0GTaehPwdyo5hKaELgA04lAiVw@public.gmane.org>
@ 2005-03-31 14:27       ` Pavel Machek
  0 siblings, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2005-03-31 14:27 UTC (permalink / raw)
  To: Stefan Seyfried; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hi!

> > --- 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
> 
> > +		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");
> 
> Oh, now that i read this... :-)
> 
> What is the difference beteen "*enabled" and "enabled"? I noticed it today
> when trying to get my Armada E500 to wake-on-lan from S3. So what is
> wakeup.flags.run_wake?

Not quite sure, probably something to do with runtime wakeups :-).
				Pavel
-- 
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms         



-------------------------------------------------------
This SF.net email is sponsored by Demarc:
A global provider of Threat Management Solutions.
Download our HomeAdmin security software for free today!
http://www.demarc.com/Info/Sentarus/hamr30

^ 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