diff options
author | Andrea Parri <andrea.parri@amarulasolutions.com> | 2018-11-27 12:22:25 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2018-12-19 00:37:00 +0100 |
commit | dff6d593b10fc04a24e07650c459947e9d6ff3c3 (patch) | |
tree | db87952b827ac493f25249492bd028bd9b133589 /drivers/bluetooth/btusb.c | |
parent | Bluetooth: btbcm: Add default address for BCM43430A0 (diff) | |
download | linux-dff6d593b10fc04a24e07650c459947e9d6ff3c3.tar.xz linux-dff6d593b10fc04a24e07650c459947e9d6ff3c3.zip |
Bluetooth: Remove unnecessary smp_mb__after_atomic() barriers
The barriers are redundant because atomic_test_and_clear_bit() already
provides the required full ordering for the cases in question (that is,
when the bit is cleared).
Signed-off-by: Andrea Parri <andrea.parri@amarulasolutions.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth/btusb.c')
-rw-r--r-- | drivers/bluetooth/btusb.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 7439a7eb50ac..885e17a1a9a5 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c @@ -1935,10 +1935,8 @@ static void btusb_intel_bootup(struct btusb_data *data, const void *ptr, if (len != sizeof(*evt)) return; - if (test_and_clear_bit(BTUSB_BOOTING, &data->flags)) { - smp_mb__after_atomic(); + if (test_and_clear_bit(BTUSB_BOOTING, &data->flags)) wake_up_bit(&data->flags, BTUSB_BOOTING); - } } static void btusb_intel_secure_send_result(struct btusb_data *data, @@ -1953,10 +1951,8 @@ static void btusb_intel_secure_send_result(struct btusb_data *data, set_bit(BTUSB_FIRMWARE_FAILED, &data->flags); if (test_and_clear_bit(BTUSB_DOWNLOADING, &data->flags) && - test_bit(BTUSB_FIRMWARE_LOADED, &data->flags)) { - smp_mb__after_atomic(); + test_bit(BTUSB_FIRMWARE_LOADED, &data->flags)) wake_up_bit(&data->flags, BTUSB_DOWNLOADING); - } } static int btusb_recv_event_intel(struct hci_dev *hdev, struct sk_buff *skb) |