Skip to contentSkip to conversation

misc/bt-host: Clear the ATN flag on open

PATCH New Cyril Bur 1 participant 1 message Oct 28, 2015 Char and misc drivers

lore
Share & tools
lore

Cyril Bur

author
#0 lore raw

PATCH 1/1 misc/bt-host: Clear the ATN flag on open

Not doing so might cause a subsequent read to return a stale message.

---
 drivers/misc/bt-host.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/misc/bt-host.c +2 -0
index bf1e4ac..0ee93ce 100644
@@ -120,6 +120,8 @@ static int bt_host_open(struct inode *inode, struct file *file)
 {
 	struct bt_host *bt_host = file_bt_host(file);
 
+	/* Avoid the first read reading possibly stale data */
+	clr_h2b_atn(bt_host);
 	clr_b_busy(bt_host);
 
 	return 0;
Signature · 1 line
2.6.2