From: Daniel Kurtz Date: Tue, 24 Jul 2012 12:13:57 +0000 (+0200) Subject: i2c-i801: Clear only status bits in HST_STS X-Git-Tag: upstream/snapshot3+hdmi~6988^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ba8b8bfd56533f0b9af7513c6ebbc10c79ae052;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git i2c-i801: Clear only status bits in HST_STS 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 Signed-off-by: Jean Delvare --- diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 51e11eb..05f3949 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c @@ -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,