Skip to contentSkip to conversation

acpi: sleep/proc.c cleanups

PATCH Pavel Machek 2 participants 3 messages Mar 19, 2005 – Mar 31, 2005 2 messages not in the archive ACPI

lore
Share & tools
lore
#0 lore raw

Hi!

This removes strange constructs and makes code shorter/clearer. Please apply,

Pavel

drivers/acpi/sleep/proc.c +5 -9
@@ -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;
 		}
Signature · 9 lines
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

A message that is not in the archive (sent off-list or not yet received): 20050319110657.GA1530-I/[email protected]

#2 lore raw

drivers/acpi/sleep/proc.c line 374

Quoted 7 lines · Pavel Machek
drivers/acpi/sleep/proc.c +4 -0
 
+		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?

Signature · 9 lines
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

A message that is not in the archive (sent off-list or not yet received): 20050319223115.GC29495-l0tNAEGuAhhzZ8+rp42Dbp9+tswZ0GTaehPwdyo5hKaELgA04lAiVw@public.gmane.org

#4 lore raw

Hi!

Quoted 10 lines

drivers/acpi/sleep/proc.c line 374

Quoted 7 lines
drivers/acpi/sleep/proc.c +4 -0
 
+		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... :-)

Quoted 3 lines

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

Signature · 9 lines
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