ASoC: codecs: use function if config is enabled
Use "wcd_mbhc_usbc_ana_event_handler" function only when CONFIG_QCOM_FSA4480_I2C is enabled. Change-Id: I5211a8ce09fb06021310e528b5815fdbcd3f2dab Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
/* Copyright (c) 2015-2019, The Linux Foundation. All rights reserved.
|
/* Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.
|
||||||
*/
|
*/
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
@@ -1579,6 +1579,7 @@ static int wcd_mbhc_set_keycode(struct wcd_mbhc *mbhc)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_QCOM_FSA4480_I2C)
|
||||||
static int wcd_mbhc_usbc_ana_event_handler(struct notifier_block *nb,
|
static int wcd_mbhc_usbc_ana_event_handler(struct notifier_block *nb,
|
||||||
unsigned long mode, void *ptr)
|
unsigned long mode, void *ptr)
|
||||||
{
|
{
|
||||||
@@ -1597,6 +1598,13 @@ static int wcd_mbhc_usbc_ana_event_handler(struct notifier_block *nb,
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
static int wcd_mbhc_usbc_ana_event_handler(struct notifier_block *nb,
|
||||||
|
unsigned long mode, void *ptr)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int wcd_mbhc_start(struct wcd_mbhc *mbhc, struct wcd_mbhc_config *mbhc_cfg)
|
int wcd_mbhc_start(struct wcd_mbhc *mbhc, struct wcd_mbhc_config *mbhc_cfg)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user