From patchwork Thu Mar 18 03:49:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1455065 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F1ChP1kcnz9sWV; Thu, 18 Mar 2021 14:49:41 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1lMjfF-0007Vn-Ms; Thu, 18 Mar 2021 03:49:37 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lMjfD-0007V3-PB for kernel-team@lists.ubuntu.com; Thu, 18 Mar 2021 03:49:35 +0000 Received: from 61-220-137-34.hinet-ip.hinet.net ([61.220.137.34] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1lMjfC-0005AP-N7 for kernel-team@lists.ubuntu.com; Thu, 18 Mar 2021 03:49:35 +0000 From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][H/OEM-5.10][PATCH 3/6] ASoC: SOF: sof-pci-dev: add .shutdown() callback Date: Thu, 18 Mar 2021 11:49:17 +0800 Message-Id: <20210318034922.7546-4-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210318034922.7546-1-hui.wang@canonical.com> References: <20210318034922.7546-1-hui.wang@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Keyon Jie BugLink: https://bugs.launchpad.net/bugs/1919930 Add the .shutdown() callback to the sof-pci-dev driver, to help to handle shutting down specific tasks for SOF PCI platforms. Signed-off-by: Keyon Jie Reviewed-by: Bard Liao Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210113152617.4048541-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown (cherry picked from commit 3475b44c7601d6f2b4d96e731047ef73fd2f1eb2) Signed-off-by: Hui Wang --- sound/soc/sof/sof-pci-dev.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c index 9adf50b20a73..1cb4b25e5777 100644 --- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c @@ -459,6 +459,11 @@ static void sof_pci_remove(struct pci_dev *pci) pci_release_regions(pci); } +static void sof_pci_shutdown(struct pci_dev *pci) +{ + snd_sof_device_shutdown(&pci->dev); +} + /* PCI IDs */ static const struct pci_device_id sof_pci_ids[] = { #if IS_ENABLED(CONFIG_SND_SOC_SOF_MERRIFIELD) @@ -532,6 +537,7 @@ static struct pci_driver snd_sof_pci_driver = { .id_table = sof_pci_ids, .probe = sof_pci_probe, .remove = sof_pci_remove, + .shutdown = sof_pci_shutdown, .driver = { .pm = &sof_pci_pm, },