Corentin Chary wrote:
On Thu, Dec 10, 2009 at 11:30 PM, Alan Jenkins
<[email protected]> wrote:
+static ssize_t store_cpufv_disabled(struct device *dev,
+ struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ struct eeepc_laptop *eeepc = dev_get_drvdata(dev);
+ int rv, value;
+
+ rv = parse_arg(buf, count, &value);
+ if (rv < 0)
+ return rv;
+
+ switch (value) {
+ case 0:
+ if (eeepc->cpufv_disabled)
+ pr_warning("cpufv enabled (not officially supported
"
+ "on this model)\n");
+ eeepc->cpufv_disabled = false;
+ return rv;
+ case 1:
+ return -EPERM;
Why -EPERM if value 1 ? Can't we just do cpufv->disabled = true; return rv; ?
On its own, that would mean
echo 1 > cpufv_disabled
echo 0 > cpufv_disabled
would always log the "not officially supported" warning, even on
supported models.
I didn't think it was worth the extra code to distinguish between
"disabled by kernel blacklist" and "disabled by user". If you enable it
and then change your mind, you get to reboot :).
Thanks
Alan
_______________________________________________
Debian-eeepc-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-eeepc-devel