summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVenkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org>2020-09-10 12:30:43 +0200
committerMarcel Holtmann <marcel@holtmann.org>2020-09-11 09:09:48 +0200
commit054ec5e94a46b0941c1a79356bc4497c738129a2 (patch)
tree556f925a182ff99052542e4cb056754ccbc24c00
parentBluetooth: hci_serdev: Close UART port if NON_PERSISTENT_SETUP is set (diff)
downloadlinux-054ec5e94a46b0941c1a79356bc4497c738129a2.tar.xz
linux-054ec5e94a46b0941c1a79356bc4497c738129a2.zip
Bluetooth: hci_qca: Remove duplicate power off in proto close
During serdev unregister, hdev->shutdown is called before proto close. Removing duplicates power OFF call. Signed-off-by: Venkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r--drivers/bluetooth/hci_qca.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 6577356d849b..244b8feba523 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -693,8 +693,6 @@ static int qca_close(struct hci_uart *hu)
destroy_workqueue(qca->workqueue);
qca->hu = NULL;
- qca_power_shutdown(hu);
-
kfree_skb(qca->rx_skb);
hu->priv = NULL;
@@ -2031,8 +2029,9 @@ static int qca_serdev_probe(struct serdev_device *serdev)
static void qca_serdev_remove(struct serdev_device *serdev)
{
struct qca_serdev *qcadev = serdev_device_get_drvdata(serdev);
+ struct qca_power *power = qcadev->bt_power;
- if (qca_is_wcn399x(qcadev->btsoc_type))
+ if (qca_is_wcn399x(qcadev->btsoc_type) && power->vregs_on)
qca_power_shutdown(&qcadev->serdev_hu);
else if (qcadev->susclk)
clk_disable_unprepare(qcadev->susclk);