[PATCH linux 13/13] misc/bt-host: read bt ctrl state after poll_wait

OpenBMC Patches patches at stwcx.xyz
Fri Oct 23 04:59:13 AEDT 2015


From: Jeremy Kerr <jk at ozlabs.org>

Signed-off-by: Jeremy Kerr <jk at ozlabs.org>
---
 drivers/misc/bt-host.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/misc/bt-host.c b/drivers/misc/bt-host.c
index 29f3104..bf1e4ac 100644
--- a/drivers/misc/bt-host.c
+++ b/drivers/misc/bt-host.c
@@ -219,11 +219,13 @@ static int bt_host_release(struct inode *inode, struct file *file)
 static unsigned int bt_host_poll(struct file *file, poll_table *wait)
 {
 	struct bt_host *bt_host = file_bt_host(file);
-	uint8_t ctrl = bt_inb(bt_host, BT_CTRL);
 	unsigned int mask = 0;
+	uint8_t ctrl;
 
 	poll_wait(file, &bt_host->queue, wait);
 
+	ctrl = bt_inb(bt_host, BT_CTRL);
+
 	if (ctrl & BT_CTRL_H2B_ATN)
 		mask |= POLLIN;
 
-- 
2.6.0




More information about the openbmc mailing list