Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360528
b: refs/heads/master
c: 27eb9e7
h: refs/heads/master
v: v3
  • Loading branch information
Maxim Mikityanskiy authored and Matthew Garrett committed Feb 24, 2013
1 parent 10c4140 commit d7357b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: 6cae06e603339f99334bc6b276e2ac619cf0d476
refs/heads/master: 27eb9e7f1211ecab64027113478867adfed6a7c8
12 changes: 6 additions & 6 deletions trunk/drivers/platform/x86/msi-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ static ssize_t set_device_state(const char *buf, size_t count, u8 mask)
/* read current device state */
result = ec_read(MSI_STANDARD_EC_COMMAND_ADDRESS, &rdata);
if (result < 0)
return -EINVAL;
return result;

if (!!(rdata & mask) != status) {
/* reverse device bit */
Expand All @@ -209,7 +209,7 @@ static ssize_t set_device_state(const char *buf, size_t count, u8 mask)

result = ec_write(MSI_STANDARD_EC_COMMAND_ADDRESS, wdata);
if (result < 0)
return -EINVAL;
return result;
}

return count;
Expand All @@ -222,7 +222,7 @@ static int get_wireless_state(int *wlan, int *bluetooth)

result = ec_transaction(MSI_EC_COMMAND_WIRELESS, &wdata, 1, &rdata, 1);
if (result < 0)
return -1;
return result;

if (wlan)
*wlan = !!(rdata & 8);
Expand All @@ -240,7 +240,7 @@ static int get_wireless_state_ec_standard(void)

result = ec_read(MSI_STANDARD_EC_COMMAND_ADDRESS, &rdata);
if (result < 0)
return -1;
return result;

wlan_s = !!(rdata & MSI_STANDARD_EC_WLAN_MASK);

Expand All @@ -258,7 +258,7 @@ static int get_threeg_exists(void)

result = ec_read(MSI_STANDARD_EC_DEVICES_EXISTS_ADDRESS, &rdata);
if (result < 0)
return -1;
return result;

threeg_exists = !!(rdata & MSI_STANDARD_EC_3G_MASK);

Expand Down Expand Up @@ -343,7 +343,7 @@ static ssize_t show_threeg(struct device *dev,

/* old msi ec not support 3G */
if (old_ec_model)
return -1;
return -ENODEV;

ret = get_wireless_state_ec_standard();
if (ret < 0)
Expand Down

0 comments on commit d7357b8

Please sign in to comment.