mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
sound: Use conftest to find if snd_soc_dai_ops has probe callback
Use conftest to find if struct snd_soc_dai_ops have the probe()
callback or not. In Linux 6.5, commit 516ee7009ff20 ("ASoC:
tegra: merge DAI call back functions into ops") added probe()
callback into the struct snd_soc_dai_ops.
Bug 4346767
Change-Id: If292f10d6e52a2cf80c7700ff7aba5805041531f
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028743
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
bf46060d1e
commit
350a86106e
@@ -3,6 +3,8 @@
|
||||
* Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/of_platform.h>
|
||||
@@ -237,7 +239,7 @@ static int tegra210_admaif_dai_probe(struct snd_soc_dai *dai)
|
||||
}
|
||||
|
||||
static struct snd_soc_dai_ops tegra210_admaif_dai_ops = {
|
||||
#if defined(NV_SND_SOC_DAI_OPS_STRUCT_HAS_PROBE_ARG)
|
||||
#if defined(NV_SND_SOC_DAI_OPS_STRUCT_HAS_PROBE_PRESENT) /* Linux 6.5 */
|
||||
.probe = tegra210_admaif_dai_probe,
|
||||
#endif
|
||||
.hw_params = tegra210_admaif_hw_params,
|
||||
@@ -245,7 +247,7 @@ static struct snd_soc_dai_ops tegra210_admaif_dai_ops = {
|
||||
.startup = tegra210_admaif_startup,
|
||||
};
|
||||
|
||||
#if defined(NV_SND_SOC_DAI_OPS_STRUCT_HAS_PROBE_ARG)
|
||||
#if defined(NV_SND_SOC_DAI_OPS_STRUCT_HAS_PROBE_PRESENT) /* Linux 6.5 */
|
||||
#define ADMAIF_DAI(id) \
|
||||
{ \
|
||||
.name = "ADMAIF" #id, \
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
//
|
||||
// Copyright (c) 2020-2023 NVIDIA CORPORATION. All rights reserved.
|
||||
|
||||
#include <nvidia/conftest.h>
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/module.h>
|
||||
@@ -791,7 +793,7 @@ static int tegra_admaif_dai_probe(struct snd_soc_dai *dai)
|
||||
}
|
||||
|
||||
static const struct snd_soc_dai_ops tegra_admaif_dai_ops = {
|
||||
#if defined(NV_SND_SOC_DAI_OPS_STRUCT_HAS_PROBE_ARG)
|
||||
#if defined(NV_SND_SOC_DAI_OPS_STRUCT_HAS_PROBE_PRESENT) /* Linux 6.5 */
|
||||
.probe = tegra_admaif_dai_probe,
|
||||
#endif
|
||||
.hw_params = tegra_admaif_hw_params,
|
||||
@@ -800,7 +802,7 @@ static const struct snd_soc_dai_ops tegra_admaif_dai_ops = {
|
||||
.prepare = tegra_admaif_prepare,
|
||||
};
|
||||
|
||||
#if defined(NV_SND_SOC_DAI_OPS_STRUCT_HAS_PROBE_ARG)
|
||||
#if defined(NV_SND_SOC_DAI_OPS_STRUCT_HAS_PROBE_PRESENT) /* Linux 6.5 */
|
||||
#define DAI(dai_name) \
|
||||
{ \
|
||||
.name = dai_name, \
|
||||
|
||||
Reference in New Issue
Block a user