Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 55173
b: refs/heads/master
c: 63232dc
h: refs/heads/master
i:
  55171: edf053c
v: v3
  • Loading branch information
Stelian Pop authored and Jean Delvare committed May 8, 2007
1 parent 6bf850b commit 9c52529
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 2d8dd65fc14287f2c004dd755e517ba0f45d446e
refs/heads/master: 63232dcd555d60d70ce8e09b53c8ef8e4a49a3f9
8 changes: 4 additions & 4 deletions trunk/drivers/hwmon/ams/ams-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,17 @@ static int ams_i2c_write(u8 reg, u8 value)
static int ams_i2c_cmd(enum ams_i2c_cmd cmd)
{
s32 result;
int remaining = HZ / 20;
int count = 3;

ams_i2c_write(AMS_COMMAND, cmd);
mdelay(5);
msleep(5);

while (remaining) {
while (count--) {
result = ams_i2c_read(AMS_COMMAND);
if (result == 0 || result & 0x80)
return 0;

remaining = schedule_timeout(remaining);
schedule_timeout_uninterruptible(HZ / 20);
}

return -1;
Expand Down

0 comments on commit 9c52529

Please sign in to comment.