From 838f0b885f40ea72fc661e56002cb7ee39347969 Mon Sep 17 00:00:00 2001 From: Laxminath Kasam Date: Tue, 23 Oct 2018 20:20:18 +0530 Subject: [PATCH] asoc: wcd937x: move export functions to new header For export functions from wcd937x use separate header as internal header is only supposed to be used within wcd937x driver logic. Change-Id: Ice373ff95f7166a2f968458b25223c582edc7fba Signed-off-by: Laxminath Kasam --- asoc/codecs/wcd937x/internal.h | 2 -- asoc/codecs/wcd937x/wcd937x.c | 1 + asoc/codecs/wcd937x/wcd937x.h | 27 +++++++++++++++++++++++++++ asoc/sm6150.c | 2 +- 4 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 asoc/codecs/wcd937x/wcd937x.h diff --git a/asoc/codecs/wcd937x/internal.h b/asoc/codecs/wcd937x/internal.h index 4ca82726a5ce..eb2de9d69efb 100644 --- a/asoc/codecs/wcd937x/internal.h +++ b/asoc/codecs/wcd937x/internal.h @@ -168,6 +168,4 @@ extern int wcd937x_mbhc_micb_adjust_voltage(struct snd_soc_codec *codec, extern int wcd937x_get_micb_vout_ctl_val(u32 micb_mv); extern int wcd937x_micbias_control(struct snd_soc_codec *codec, int micb_num, int req, bool is_dapm); -extern int wcd937x_info_create_codec_entry(struct snd_info_entry *codec_root, - struct snd_soc_codec *codec); #endif diff --git a/asoc/codecs/wcd937x/wcd937x.c b/asoc/codecs/wcd937x/wcd937x.c index 78cdfa13cf7e..485d328389d3 100644 --- a/asoc/codecs/wcd937x/wcd937x.c +++ b/asoc/codecs/wcd937x/wcd937x.c @@ -25,6 +25,7 @@ #include #include #include "internal.h" +#include "wcd937x.h" #include "../wcdcal-hwdep.h" #include "wcd937x-registers.h" #include "../msm-cdc-pinctrl.h" diff --git a/asoc/codecs/wcd937x/wcd937x.h b/asoc/codecs/wcd937x/wcd937x.h new file mode 100644 index 000000000000..49905d77f54c --- /dev/null +++ b/asoc/codecs/wcd937x/wcd937x.h @@ -0,0 +1,27 @@ +/* Copyright (c) 2018, The Linux Foundation. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 and + * only version 2 as published by the Free Software Foundation. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef _WCD937X_H +#define _WCD937X_H + +#ifdef CONFIG_SND_SOC_WCD937X +extern int wcd937x_info_create_codec_entry(struct snd_info_entry *codec_root, + struct snd_soc_codec *codec); +#else +extern int wcd937x_info_create_codec_entry(struct snd_info_entry *codec_root, + struct snd_soc_codec *codec) +{ + return 0; +} +#endif /* CONFIG_SND_SOC_WCD937X */ + +#endif diff --git a/asoc/sm6150.c b/asoc/sm6150.c index 8bd1d6f32086..307ef0c6321d 100644 --- a/asoc/sm6150.c +++ b/asoc/sm6150.c @@ -42,7 +42,7 @@ #include "codecs/bolero/bolero-cdc.h" #include #include "codecs/bolero/wsa-macro.h" -#include "codecs/wcd937x/internal.h" +#include "codecs/wcd937x/wcd937x.h" #define DRV_NAME "sm6150-asoc-snd"