Patch for USB wakeups
Robert Spanton
rds204 at zepler.net
Mon Jan 21 16:55:57 PST 2008
Hi,
A while back I posted a patch to this mailing list [1], but I don't think
anyone noticed it. I'm reposting it just in case:
According to Documentation/ABI/testing/sysfs-bus-usb in Linux, the
autosuspend files contain a negative number if autosuspend is disabled. At
the moment, powertop converts the number into an _unsigned_ long long int
before any comparison, which to me seems like the wrong thing to do.
This patch converts it to a signed long long int instead.
[1] http://article.gmane.org/gmane.linux.power-management.powertop/1030/
match=according+documentation+abi+testing+sysfs+bus+usb+linux
Cheers,
Rob
And the patch:
Index: usb.c
===================================================================
--- usb.c (revision 273)
+++ usb.c (working copy)
@@ -89,7 +89,7 @@
fclose(file);
continue;
}
- if (strtoull(line, NULL,10)<1)
+ if (strtoll(line, NULL,10)<0)
need_hint = 1;
fclose(file);
More information about the Power
mailing list