Skip to content

Commit

Permalink
i2c-i801: Clear only status bits in HST_STS
Browse files Browse the repository at this point in the history
Writing back the whole status register could clear unwanted bits.
In particular, it could clear the "INUSE_STS" bit, which is a
'hardware semaphore', that might be useful to use some day.
To prepare for this, let's ban writing back the whole status to register
HST_STS, of which this is the only instance.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
Daniel Kurtz authored and Jean Delvare committed Jul 24, 2012
1 parent efa3cb1 commit 0ba8b8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-i801.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ static void i801_wait_hwpec(struct i801_priv *priv)
if (timeout > MAX_RETRIES)
dev_dbg(&priv->pci_dev->dev, "PEC Timeout!\n");

outb_p(status, SMBHSTSTS(priv));
outb_p(status & STATUS_FLAGS, SMBHSTSTS(priv));
}

static int i801_block_transaction_by_block(struct i801_priv *priv,
Expand Down

0 comments on commit 0ba8b8b

Please sign in to comment.