Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262596
b: refs/heads/master
c: 49979d0
h: refs/heads/master
v: v3
  • Loading branch information
Corentin Chary authored and Matthew Garrett committed Aug 5, 2011
1 parent eaf47b3 commit 08a0612
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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: a4ecbb8ae7be16497db2f984ee7a3ffec0f164c3
refs/heads/master: 49979d091d1847823c064301da1ec173619ddd92
9 changes: 5 additions & 4 deletions trunk/drivers/platform/x86/asus-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,8 @@ static int asus_wmi_rfkill_init(struct asus_wmi *asus)
* Hwmon device
*/
static ssize_t asus_hwmon_pwm1(struct device *dev,
struct device_attribute *attr,
char *buf)
struct device_attribute *attr,
char *buf)
{
struct asus_wmi *asus = dev_get_drvdata(dev);
u32 value;
Expand All @@ -809,7 +809,7 @@ static ssize_t asus_hwmon_pwm1(struct device *dev,
if (err < 0)
return err;

value |= 0xFF;
value &= 0xFF;

if (value == 1) /* Low Speed */
value = 85;
Expand Down Expand Up @@ -869,7 +869,7 @@ static mode_t asus_hwmon_sysfs_is_visible(struct kobject *kobj,
* - reverved bits are non-zero
* - sfun and presence bit are not set
*/
if (value != ASUS_WMI_UNSUPPORTED_METHOD || value & 0xFFF80000
if (value == ASUS_WMI_UNSUPPORTED_METHOD || value & 0xFFF80000
|| (!asus->sfun && !(value & ASUS_WMI_DSTS_PRESENCE_BIT)))
ok = false;
}
Expand Down Expand Up @@ -904,6 +904,7 @@ static int asus_wmi_hwmon_init(struct asus_wmi *asus)
pr_err("Could not register asus hwmon device\n");
return PTR_ERR(hwmon);
}
dev_set_drvdata(hwmon, asus);
asus->hwmon_device = hwmon;
result = sysfs_create_group(&hwmon->kobj, &hwmon_attribute_group);
if (result)
Expand Down

0 comments on commit 08a0612

Please sign in to comment.