hv: fix incorrect use of atomic_set_xxx

1. vpic_wire_mode no need to atomically set its value.
2. uart open conut want to atomically set its value not atomically set
its bits.

Signed-off-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Li, Fei1
2018-05-16 15:49:09 +08:00
committed by lijinxia
parent 0a83cf462d
commit bd3f3b00f7
3 changed files with 15 additions and 20 deletions

View File

@@ -161,10 +161,10 @@ static int uart16550_init(struct tgt_uart *tgt_uart)
status = -ENODEV;
} else {
if (strcmp(tgt_uart->uart_id, "STDIO") == 0) {
atomic_set_int(&tgt_uart->open_count, 0);
atomic_store_rel_int(&tgt_uart->open_count, 0);
} else {
/* set open count to 1 to prevent open */
atomic_set_int(&tgt_uart->open_count, 1);
atomic_store_rel_int(&tgt_uart->open_count, 1);
status = -EINVAL;
}
}