From patchwork Thu Mar 18 04:39:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 1455081 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 4F1Dnz23Wvz9sWK; Thu, 18 Mar 2021 15:39:35 +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 1lMkRX-0001f0-St; Thu, 18 Mar 2021 04:39:31 +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 1lMkRW-0001e9-7V for kernel-team@lists.ubuntu.com; Thu, 18 Mar 2021 04:39:30 +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 1lMkRV-0000KI-3l for kernel-team@lists.ubuntu.com; Thu, 18 Mar 2021 04:39:29 +0000 From: Hui Wang To: kernel-team@lists.ubuntu.com Subject: [SRU][H/OEM-5.10][PATCH v2 2/6] ASoC: SOF: add snd_sof_device_shutdown() helper for shutdown Date: Thu, 18 Mar 2021 12:39:12 +0800 Message-Id: <20210318043918.9900-3-hui.wang@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210318043918.9900-1-hui.wang@canonical.com> References: <20210318043918.9900-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 helper snd_sof_device_shutdown() to wrap the platform specific .shutdown callbacks for SOF 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-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown (cherry picked from commit daff7f1478e12cdee3e639c83c571cfd38bc5080) Signed-off-by: Hui Wang --- sound/soc/sof/core.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/soc/sof/core.c b/sound/soc/sof/core.c index adc7c37145d6..8532742b0519 100644 --- a/sound/soc/sof/core.c +++ b/sound/soc/sof/core.c @@ -384,6 +384,14 @@ int snd_sof_device_remove(struct device *dev) } EXPORT_SYMBOL(snd_sof_device_remove); +int snd_sof_device_shutdown(struct device *dev) +{ + struct snd_sof_dev *sdev = dev_get_drvdata(dev); + + return snd_sof_shutdown(sdev); +} +EXPORT_SYMBOL(snd_sof_device_shutdown); + MODULE_AUTHOR("Liam Girdwood"); MODULE_DESCRIPTION("Sound Open Firmware (SOF) Core"); MODULE_LICENSE("Dual BSD/GPL");