[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161011172441.7422-3-palminha@synopsys.com>
Date: Tue, 11 Oct 2016 18:24:38 +0100
From: Carlos Palminha <CARLOS.PALMINHA@...opsys.com>
To: <linux-i2c@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <jdelvare@...e.com>, <wsa@...-dreams.de>,
<CARLOS.PALMINHA@...opsys.com>
Subject: [PATCH 2/5] i2c: i2c-piix4: coding style fix - assignment in if condition
Signed-off-by: Carlos Palminha <palminha@...opsys.com>
---
drivers/i2c/busses/i2c-piix4.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
index 6b55a8e..5d6f637 100644
--- a/drivers/i2c/busses/i2c-piix4.c
+++ b/drivers/i2c/busses/i2c-piix4.c
@@ -419,11 +419,13 @@ static int piix4_transaction(struct i2c_adapter *piix4_adapter)
inb_p(SMBHSTDAT1));
/* Make sure the SMBus host is ready to start transmitting */
- if ((temp = inb_p(SMBHSTSTS)) != 0x00) {
+ temp = inb_p(SMBHSTSTS);
+ if (temp != 0x00) {
dev_dbg(&piix4_adapter->dev, "SMBus busy (%02x). "
"Resetting...\n", temp);
outb_p(temp, SMBHSTSTS);
- if ((temp = inb_p(SMBHSTSTS)) != 0x00) {
+ temp = inb_p(SMBHSTSTS);
+ if (temp != 0x00) {
dev_err(&piix4_adapter->dev, "Failed! (%02x)\n", temp);
return -EBUSY;
} else {
@@ -470,7 +472,8 @@ static int piix4_transaction(struct i2c_adapter *piix4_adapter)
if (inb_p(SMBHSTSTS) != 0x00)
outb_p(inb(SMBHSTSTS), SMBHSTSTS);
- if ((temp = inb_p(SMBHSTSTS)) != 0x00) {
+ temp = inb_p(SMBHSTSTS);
+ if (temp != 0x00) {
dev_err(&piix4_adapter->dev, "Failed reset at end of "
"transaction (%02x)\n", temp);
}
--
2.9.3
Powered by blists - more mailing lists