Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp965157pxk; Thu, 10 Sep 2020 03:32:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6kGMOzWEMt9JUMQdUmK3lNLtRKSY2qiEwb5+CEM1a4SCbpG1XK6xa+g989Yplhwsg6GPm X-Received: by 2002:a50:8e17:: with SMTP id 23mr8405662edw.42.1599733957277; Thu, 10 Sep 2020 03:32:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599733957; cv=none; d=google.com; s=arc-20160816; b=uY1aMCordqOfBDcyZibQ4MHgVsBI/LfZ+OveuHcxmm93HiJn1lD5QhizK7rShoEGp4 Rx3ta8ggPR3D4MDZdT5gmU1tiSObWHzzW4mckIIWpkuLErYyGNJ6UCAWa4zKYgg8u4PK APmNQkzuh2MtsTfPAhV0LMpG5i00GBpubAIIxVheXaU0UZLAONKjuVgSfRHwLVUiA0RO QcM749tIOVYZI8ayBDHSTvVf9fS9C+2vdjO0ML/zJC+Jtd7FVlDEsuAlZ5vBkHbbnIfM EALRLXJYZsOEaS+cXrmn/hworACAimXa2cWZlAPtDHh8ZYjIkMYKBC/PwUDE2Opbmg3p p25Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=lPjeEmTtrSkTi/xhzaLdWOWYT2hL7hWjbseYIMDIn2M=; b=PJ/BIiwJ0ll8NJ+GFACZmal9R85UkXlKqbApQWbYWv0fpJt5zJwMZH0UeI0f7YX7Im 2oz9CtM8Hbrh2XOSFtEkDe+TPH4SSVQOvVZeaRaelGOoI+CdT0OULRm6oaYA3S90Wztm 4PA1m6Yg6Ho9h47Ey7i4e9c+RVx8e6rw4oHdLgmQziWg0edYQUk1TXJTc9CeoSt7BgJ4 ccOzlu0CyJ5moXG9gMNCxRGTgrwaYO5JoVRU6iNrweQkbPdv3EdnkadAxcHnJDlv4NO9 z7/IDa7r5AMOaZKU6OG7QYB0SNN6EeUV6lPH9ppVtlkEYo2dZxe48+qXCv62KrVmlDgx Zvvw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dg23si3382067edb.229.2020.09.10.03.32.14; Thu, 10 Sep 2020 03:32:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730748AbgIJKbg (ORCPT + 99 others); Thu, 10 Sep 2020 06:31:36 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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); -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation