From patchwork Thu Sep 10 10:30:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkata Lakshmi Narayana Gubba X-Patchwork-Id: 11767409 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B747F92C for ; Thu, 10 Sep 2020 10:31:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9BAEC2145D for ; Thu, 10 Sep 2020 10:31:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730567AbgIJKbf (ORCPT ); Thu, 10 Sep 2020 06:31:35 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:15633 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729275AbgIJKbP (ORCPT ); Thu, 10 Sep 2020 06:31:15 -0400 Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 10 Sep 2020 03:31:15 -0700 Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 10 Sep 2020 03:31:14 -0700 Received: from gubbaven-linux.qualcomm.com ([10.206.64.32]) by ironmsg01-blr.qualcomm.com with ESMTP; 10 Sep 2020 16:00:45 +0530 Received: by gubbaven-linux.qualcomm.com (Postfix, from userid 2365015) id D569721B5F; Thu, 10 Sep 2020 16:00:45 +0530 (IST) From: Venkata Lakshmi Narayana Gubba To: marcel@holtmann.org, johan.hedberg@gmail.com Cc: mka@chromium.org, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, hemantg@codeaurora.org, linux-arm-msm@vger.kernel.org, bgodavar@codeaurora.org, rjliao@codeaurora.org, hbandi@codeaurora.org, abhishekpandit@chromium.org, Venkata Lakshmi Narayana Gubba Subject: [RESEND v1 2/2] Bluetooth: hci_qca: Remove duplicate power off in proto close Date: Thu, 10 Sep 2020 16:00:43 +0530 Message-Id: <1599733843-20311-3-git-send-email-gubbaven@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1599733843-20311-1-git-send-email-gubbaven@codeaurora.org> References: <1599733843-20311-1-git-send-email-gubbaven@codeaurora.org> Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org During serdev unregister, hdev->shutdown is called before proto close. Removing duplicates power OFF call. Signed-off-by: Venkata Lakshmi Narayana Gubba --- drivers/bluetooth/hci_qca.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 20e1ded..f0d9ee3 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; @@ -2032,8 +2030,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);