Skip to contentSkip to conversation

Fix "echo -n 3 > /sys/.../power/state"

PATCH New Russell King 1 participant 1 message Dec 31, 2003

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix "echo -n 3 > /sys/.../power/state"

Fix what seems to be a typo preventing .../power/state from working.

drivers/base/power/sysfs.c +1 -1
@@ -36,7 +36,7 @@
 	int error = 0;
 
 	state = simple_strtoul(buf,&rest,10);
-	if (rest)
+	if (*rest)
 		return -EINVAL;
 	if (state)
 		error = dpm_runtime_suspend(dev,state);
Signature · 4 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core