Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 221716
b: refs/heads/master
c: 90482e4
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and Linus Torvalds committed Nov 12, 2010
1 parent 8f8c205 commit 0c6c721
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 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: 43b3a0c732776746f53d8ed2ba659583fc1692aa
refs/heads/master: 90482e45e4a39ee10b66436c2b3d5d4d88c2f73c
4 changes: 3 additions & 1 deletion trunk/drivers/misc/isl29020.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ static ssize_t als_sensing_range_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
struct i2c_client *client = to_i2c_client(dev);
unsigned int ret_val;
int ret_val;
unsigned long val;

if (strict_strtoul(buf, 10, &val))
Expand All @@ -106,6 +106,8 @@ static ssize_t als_sensing_range_store(struct device *dev,
val = 4;

ret_val = i2c_smbus_read_byte_data(client, 0x00);
if (ret_val < 0)
return ret_val;

ret_val &= 0xFC; /*reset the bit before setting them */
ret_val |= val - 1;
Expand Down

0 comments on commit 0c6c721

Please sign in to comment.