From patchwork Tue Aug 16 11:17:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 597544 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3B8B9C25B0E for ; Tue, 16 Aug 2022 11:09:01 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 23EF11650; Tue, 16 Aug 2022 13:08:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 23EF11650 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1660648139; bh=DlCHbBLmYpBhZOy6P1Vp+2wi9cqcmb5zazV3g9hM7RA=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=UQinuladqTVXo6WfUXwXc64C5e8DCxlWsYBi6ugemvRsNzb4KRph4DI/uzMGJQMmZ FbUgOlsJdmySbVpSS1ix0dRE90F7KwbSrJkgCtHLV6O6pHGWRhn6+DV70ikKsn+LzP Qdt7TnPHeBuapDVz7MLRyD6W7DYPmGr+ewm+vtzM= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1717EF80424; Tue, 16 Aug 2022 13:07:47 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DE54CF8053E; Tue, 16 Aug 2022 13:07:45 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9D191F80238 for ; Tue, 16 Aug 2022 13:07:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9D191F80238 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="MkRJxFLs" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660648059; x=1692184059; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DlCHbBLmYpBhZOy6P1Vp+2wi9cqcmb5zazV3g9hM7RA=; b=MkRJxFLszvO1KFqJIW5171nXdOv3cTPgZN8YrJMmh4mKDASh+7pOlLNr p4qAduUf8xfoRAUJ5lvOflEyter/aNoluvZBLJc3nCsbrH+slNicl0YQ6 NzDnK5AjwKbDU7M+xngcSM4Rgos++saK5c9VcQusTw52nrDLW/PEXX8h6 XakDyBgi5lwgleTNHudxG3eQxH+TuYjSnnFs9Y4R4JGXjl4ofg8shAIhe kxavgLlgtd5hYlS5INFM0IYJFhZZMgjBDiJi2z/leyj9iz8jl7dURP1Mk RhbWrXpAsmg2zRw3x4SdxaYEj7lZOJd1HpTzyP/gQlxHZDPgziw2RGJay w==; X-IronPort-AV: E=McAfee;i="6400,9594,10440"; a="271960439" X-IronPort-AV: E=Sophos;i="5.93,240,1654585200"; d="scan'208";a="271960439" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2022 04:07:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,240,1654585200"; d="scan'208";a="782986150" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by orsmga005.jf.intel.com with ESMTP; 16 Aug 2022 04:07:30 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org, tiwai@suse.com Subject: [RESEND PATCH v2 1/6] ASoC: Intel: Skylake: Introduce HDA codec init and exit routines Date: Tue, 16 Aug 2022 13:17:22 +0200 Message-Id: <20220816111727.3218543-2-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220816111727.3218543-1-cezary.rojewski@intel.com> References: <20220816111727.3218543-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Cc: Cezary Rojewski , kai.vehmanen@linux.intel.com, pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com, amadeuszx.slawinski@linux.intel.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Preliminary step in making snd_hda_codec_device_init() the only constructor for struct hda_codec instances. To do that, existing usage of hdac_ext equivalents has to be dropped. Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Signed-off-by: Cezary Rojewski --- sound/soc/intel/skylake/skl.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c index aeca58246fc7..33b0ed6b0534 100644 --- a/sound/soc/intel/skylake/skl.c +++ b/sound/soc/intel/skylake/skl.c @@ -689,6 +689,35 @@ static void load_codec_module(struct hda_codec *codec) #endif /* CONFIG_SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC */ +static void skl_codec_device_exit(struct device *dev) +{ + snd_hdac_device_exit(dev_to_hdac_dev(dev)); +} + +static __maybe_unused struct hda_codec *skl_codec_device_init(struct hdac_bus *bus, int addr) +{ + struct hda_codec *codec; + int ret; + + codec = snd_hda_codec_device_init(to_hda_bus(bus), addr, "ehdaudio%dD%d", bus->idx, addr); + if (IS_ERR(codec)) { + dev_err(bus->dev, "device init failed for hdac device\n"); + return codec; + } + + codec->core.type = HDA_DEV_ASOC; + codec->core.dev.release = skl_codec_device_exit; + + ret = snd_hdac_device_register(&codec->core); + if (ret) { + dev_err(bus->dev, "failed to register hdac device\n"); + snd_hdac_device_exit(&codec->core); + return ERR_PTR(ret); + } + + return codec; +} + /* * Probe the given codec address */ From patchwork Tue Aug 16 11:17:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 597542 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DBE0EC25B0E for ; Tue, 16 Aug 2022 11:10:10 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id F19141637; Tue, 16 Aug 2022 13:09:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F19141637 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1660648209; bh=aEDCzx9MLrKU8fuOM9E3qwn8DN9miUx+B2bRPqDnZKg=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HbYj7BZ6U/5j4SeLlb2VMsE4lCKr7+BG3pSjrv5OneI3wFWBaqiyUaRGCppeRM2E9 3xhmJ1QkGolV2rpzQgUnhjrluEPiS64lny75BYfw2yr4SpOJxk1S2ESgh9cVBymHQO Acz5+X7nbT3EMvxwGgnVbXRpIiWyAh/ORau+d2x8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8D7D3F80567; Tue, 16 Aug 2022 13:07:52 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6B836F80564; Tue, 16 Aug 2022 13:07:51 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 87FC2F80082 for ; Tue, 16 Aug 2022 13:07:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 87FC2F80082 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="l1U0bpT1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660648062; x=1692184062; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aEDCzx9MLrKU8fuOM9E3qwn8DN9miUx+B2bRPqDnZKg=; b=l1U0bpT1HTUverF99h+1jgb3/4Wmp2oCjaIzlLWe3ytLSSkMz+lvggqV 0i8+i9QSKkPBz7g2+H1azGdLHyZArpO2+DE4iypskpjgg6+h6kQoFfY7P Esu8jUE5p1zWf3JK/qPzYDF7iHmBMbZBeQ7GootFPd2y3TxFuFJj48nFt ttv2xR58148wkFSbhv3lMXYUF8hOlsKbE4enVv+m5NVp9uBzWcNkuqr6c QJCJT0bVgBQCcmt8m66padB7M/vJ2UQdrmDr/wu6FyODdCxD5FHV1xDhP UNyc2LXdXuRRsifEljmllWeaSIJrlIDpdbK5E3Bk0aTHLyZJxOvGidmL3 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10440"; a="271960465" X-IronPort-AV: E=Sophos;i="5.93,240,1654585200"; d="scan'208";a="271960465" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2022 04:07:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,240,1654585200"; d="scan'208";a="782986182" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by orsmga005.jf.intel.com with ESMTP; 16 Aug 2022 04:07:38 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org, tiwai@suse.com Subject: [RESEND PATCH v2 4/6] ALSA: hda: Always free codec on the device release Date: Tue, 16 Aug 2022 13:17:25 +0200 Message-Id: <20220816111727.3218543-5-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220816111727.3218543-1-cezary.rojewski@intel.com> References: <20220816111727.3218543-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Cc: Cezary Rojewski , kai.vehmanen@linux.intel.com, pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com, amadeuszx.slawinski@linux.intel.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" With all HDAudio drivers aligned to make use of the same constructor, have codec freed on the device release regardless of its type. Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Signed-off-by: Cezary Rojewski --- sound/pci/hda/hda_codec.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 384426d7e9dd..aa7a362be290 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -883,13 +883,7 @@ static void snd_hda_codec_dev_release(struct device *dev) snd_hda_sysfs_clear(codec); kfree(codec->modelname); kfree(codec->wcaps); - - /* - * In the case of ASoC HD-audio, hda_codec is device managed. - * It will be freed when the ASoC device is removed. - */ - if (codec->core.type == HDA_DEV_LEGACY) - kfree(codec); + kfree(codec); } #define DEV_NAME_LEN 31 From patchwork Tue Aug 16 11:17:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 597543 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B7270C25B0E for ; Tue, 16 Aug 2022 11:09:33 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EEFFE1670; Tue, 16 Aug 2022 13:08:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EEFFE1670 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1660648172; bh=d3d+nlhKuxZMjpExiSQXOJQRXtJy+TDAuRNRN5fT154=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=fNLPQn9ik1z6jPdwXVgoQuIgTLd3jXSlGBvShn1MWAJ6yj4kjTJV/zPyomTWG2Hmj kzZxvcWhgBQjF5n+Xj5oVpAqPGFuRelnSomnfdPDorT+COxjRwaerb6IaI1bNAbVEg IAv07ZLzvAyVVEkIhbyoRX9jGsfo8Wl+LdVoqc/Q= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6D44CF8055A; Tue, 16 Aug 2022 13:07:50 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 72A2AF8055C; Tue, 16 Aug 2022 13:07:49 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 58979F80238 for ; Tue, 16 Aug 2022 13:07:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 58979F80238 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="AiosSXyg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660648067; x=1692184067; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=d3d+nlhKuxZMjpExiSQXOJQRXtJy+TDAuRNRN5fT154=; b=AiosSXygk9oB0QcBD1ehYpHNc5x0bzaPh7DnSlIORdV02SjoFizzi4RU BcY++wmOMXEMFq3kekh/jzpkbTcng/SIB0JxZaTAcqd1R0Xkv+WEFr69J 57hcBhGC6kP55eWUh8hRsVJ7nxOVg59a9JZ3E0BJUhyw2Xevn/piW8RJ0 a7GrJEEO8XoIzRPgSftMZcQGpog3mVjThMEjq2Ptq/OJBsfvEmbP2eb1p fAWWh9QHqfCrR3ccQ4K2fvsp2tirgwd2SLa+VjOozRRjGmBWleZQi5bbp E0LnQO6ozgO06mEmIdSsDCTC2K0gmaIUMT95VFZCVmtp6eftGWrxH2e4f Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10440"; a="271960472" X-IronPort-AV: E=Sophos;i="5.93,240,1654585200"; d="scan'208";a="271960472" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Aug 2022 04:07:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,240,1654585200"; d="scan'208";a="782986194" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by orsmga005.jf.intel.com with ESMTP; 16 Aug 2022 04:07:41 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org, tiwai@suse.com Subject: [RESEND PATCH v2 5/6] ALSA: hda: Remove codec init and exit routines Date: Tue, 16 Aug 2022 13:17:26 +0200 Message-Id: <20220816111727.3218543-6-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220816111727.3218543-1-cezary.rojewski@intel.com> References: <20220816111727.3218543-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Cc: Cezary Rojewski , kai.vehmanen@linux.intel.com, pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com, amadeuszx.slawinski@linux.intel.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" There are no users for snd_hdac_ext_bus_device_init() and snd_hdac_ext_bus_device_exit(). While at it, remove hdac_to_hda_priv() too for the exact same reason. Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Signed-off-by: Cezary Rojewski --- include/sound/hda_codec.h | 2 -- include/sound/hdaudio_ext.h | 3 -- sound/hda/ext/hdac_ext_bus.c | 53 ------------------------------------ 3 files changed, 58 deletions(-) diff --git a/include/sound/hda_codec.h b/include/sound/hda_codec.h index 6d3c82c4b6ac..2a8fe7240f10 100644 --- a/include/sound/hda_codec.h +++ b/include/sound/hda_codec.h @@ -293,8 +293,6 @@ struct hda_codec { #define dev_to_hda_codec(_dev) container_of(_dev, struct hda_codec, core.dev) #define hda_codec_dev(_dev) (&(_dev)->core.dev) -#define hdac_to_hda_priv(_hdac) \ - container_of(_hdac, struct hdac_hda_priv, codec.core) #define hdac_to_hda_codec(_hdac) container_of(_hdac, struct hda_codec, core) #define list_for_each_codec(c, bus) \ diff --git a/include/sound/hdaudio_ext.h b/include/sound/hdaudio_ext.h index d26234f9ee46..88ebb64fd8a5 100644 --- a/include/sound/hdaudio_ext.h +++ b/include/sound/hdaudio_ext.h @@ -11,9 +11,6 @@ int snd_hdac_ext_bus_init(struct hdac_bus *bus, struct device *dev, const struct hdac_ext_bus_ops *ext_ops); void snd_hdac_ext_bus_exit(struct hdac_bus *bus); -int snd_hdac_ext_bus_device_init(struct hdac_bus *bus, int addr, - struct hdac_device *hdev, int type); -void snd_hdac_ext_bus_device_exit(struct hdac_device *hdev); void snd_hdac_ext_bus_device_remove(struct hdac_bus *bus); #define HDA_CODEC_REV_EXT_ENTRY(_vid, _rev, _name, drv_data) \ diff --git a/sound/hda/ext/hdac_ext_bus.c b/sound/hda/ext/hdac_ext_bus.c index 765c40a6ccba..6004ea1c373e 100644 --- a/sound/hda/ext/hdac_ext_bus.c +++ b/sound/hda/ext/hdac_ext_bus.c @@ -60,59 +60,6 @@ void snd_hdac_ext_bus_exit(struct hdac_bus *bus) } EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_exit); -static void default_release(struct device *dev) -{ - snd_hdac_ext_bus_device_exit(dev_to_hdac_dev(dev)); -} - -/** - * snd_hdac_ext_bus_device_init - initialize the HDA extended codec base device - * @bus: hdac bus to attach to - * @addr: codec address - * @hdev: hdac device to init - * @type: codec type (HDAC_DEV_*) to use for this device - * - * Returns zero for success or a negative error code. - */ -int snd_hdac_ext_bus_device_init(struct hdac_bus *bus, int addr, - struct hdac_device *hdev, int type) -{ - char name[15]; - int ret; - - hdev->bus = bus; - - snprintf(name, sizeof(name), "ehdaudio%dD%d", bus->idx, addr); - - ret = snd_hdac_device_init(hdev, bus, name, addr); - if (ret < 0) { - dev_err(bus->dev, "device init failed for hdac device\n"); - return ret; - } - hdev->type = type; - hdev->dev.release = default_release; - - ret = snd_hdac_device_register(hdev); - if (ret) { - dev_err(bus->dev, "failed to register hdac device\n"); - snd_hdac_ext_bus_device_exit(hdev); - return ret; - } - - return 0; -} -EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_device_init); - -/** - * snd_hdac_ext_bus_device_exit - clean up a HD-audio extended codec base device - * @hdev: hdac device to clean up - */ -void snd_hdac_ext_bus_device_exit(struct hdac_device *hdev) -{ - snd_hdac_device_exit(hdev); -} -EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_device_exit); - /** * snd_hdac_ext_bus_device_remove - remove HD-audio extended codec base devices *