aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/4118-Revert-i2c-amd-I2C-Bug-fix-for-accessing-multiple-de.patch
blob: c94730c12d4e18861f2c473cfdd1cab08df0e482 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From dbff543a326952abc9cd2d8ec0c200a2b5db77e6 Mon Sep 17 00:00:00 2001
From: Sudheesh Mavila <sudheesh.mavila@amd.com>
Date: Tue, 28 Aug 2018 10:31:42 +0530
Subject: [PATCH 4118/4131] Revert "i2c-amd-I2C Bug fix for accessing multiple
 devices"

This reverts commit 18c39a15aac837900b44f4ff5f5c6dca75d45cb0.

Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
---
 drivers/i2c/busses/i2c-amd-platdrv.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 mode change 100755 => 100644 drivers/i2c/busses/i2c-amd-platdrv.c

diff --git a/drivers/i2c/busses/i2c-amd-platdrv.c b/drivers/i2c/busses/i2c-amd-platdrv.c
old mode 100755
new mode 100644
index aa48d72..5f195c9
--- a/drivers/i2c/busses/i2c-amd-platdrv.c
+++ b/drivers/i2c/busses/i2c-amd-platdrv.c
@@ -65,7 +65,7 @@ struct amd_i2c_dev {
 	struct amd_i2c_common i2c_common;
 	struct completion msg_complete;
 	struct i2c_msg *msg_buf;
-	unsigned short  is_configured;
+	bool is_configured;
 	u8 bus_id;
 	u8 *buf;
 
@@ -176,10 +176,10 @@ static int i2c_amd_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
 	dma_addr_t phys;
 
 	reinit_completion(&dev->msg_complete);
-	if (dev->is_configured != msgs->addr) {
+	if (dev->is_configured == 0) {
 		i2c_amd_pci_configure(dev, msgs->addr);
 		timeout = wait_for_completion_timeout(&dev->msg_complete, 50);
-		dev->is_configured =  msgs->addr;
+		dev->is_configured = 1;
 	}
 
 	for (i = 0; i < num; i++) {
-- 
2.7.4