Bluetooth: hci_qca: Skip serdev wait when no transfer is pending
authorMatthias Kaehlcke <mka@chromium.org>
Fri, 5 Jun 2020 18:46:10 +0000 (11:46 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 8 Jun 2020 08:12:53 +0000 (10:12 +0200)
commite2a119cd84600f7e2d94d3e8781946b69b6e2376
tree65825269cf5d91b32bbefc3570430fb57ed060fb
parenteff981f6579d5797d68d27afc0eede529ac8778a
Bluetooth: hci_qca: Skip serdev wait when no transfer is pending

qca_suspend() calls serdev_device_wait_until_sent() regardless of
whether a transfer is pending. While it does no active harm since
the function should return immediately it makes the code more
confusing. Add a flag to track whether a transfer is pending and
only call serdev_device_wait_until_sent() is needed.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_qca.c