Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262607
b: refs/heads/master
c: 3df5fda
h: refs/heads/master
i:
  262605: 3fc0136
  262603: dec2944
  262599: 2758300
  262591: 99f7fec
v: v3
  • Loading branch information
Corentin Chary authored and Matthew Garrett committed Aug 5, 2011
1 parent 5a0a56c commit 8cd5aca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e02431d6f5e8f1023ce0cfbaf70ddf4afae924d8
refs/heads/master: 3df5fdadf6400373a696bb14e27d4771e5f6afb3
8 changes: 6 additions & 2 deletions trunk/drivers/platform/x86/asus-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1307,14 +1307,18 @@ ASUS_WMI_CREATE_DEVICE_ATTR(cardr, 0644, ASUS_WMI_DEVID_CARDREADER);
static ssize_t store_cpufv(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
int value;
int value, rv;

if (!count || sscanf(buf, "%i", &value) != 1)
return -EINVAL;
if (value < 0 || value > 2)
return -EINVAL;

return asus_wmi_evaluate_method(ASUS_WMI_METHODID_CFVS, value, 0, NULL);
rv = asus_wmi_evaluate_method(ASUS_WMI_METHODID_CFVS, value, 0, NULL);
if (rv < 0)
return rv;

return count;
}

static DEVICE_ATTR(cpufv, S_IRUGO | S_IWUSR, NULL, store_cpufv);
Expand Down

0 comments on commit 8cd5aca

Please sign in to comment.