From cd857f2b69ded82e37fe0dd5158d026cbe59efd4 Mon Sep 17 00:00:00 2001 From: Guru Das Srinagesh Date: Fri, 15 May 2020 16:06:43 -0700 Subject: [PATCH] soc: qti_battery_debug: Remove CONFIG_DEBUG_FS dependency As a preparatory move to adding device attributes to the battery_debug device, remove the dependency on DEBUG_FS for driver enablement and add config guards in the driver instead. Change-Id: I8fcb385a583564935ce472416552e25ca79f4a84 Signed-off-by: Guru Das Srinagesh --- drivers/soc/qcom/Kconfig | 1 - drivers/soc/qcom/qti_battery_debug.c | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig index 7ba223837447..c4a935776c3c 100644 --- a/drivers/soc/qcom/Kconfig +++ b/drivers/soc/qcom/Kconfig @@ -242,7 +242,6 @@ config QTI_PMIC_GLINK_CLIENT_DEBUG config QTI_BATTERY_GLINK_DEBUG tristate "Enable support for QTI battery glink debug driver" depends on QTI_PMIC_GLINK - depends on DEBUG_FS help Qualcomm Technologies, Inc. battery glink debug driver helps to obtain debug information for battery charging and gauging over PMIC diff --git a/drivers/soc/qcom/qti_battery_debug.c b/drivers/soc/qcom/qti_battery_debug.c index 8e464d1af1ed..c86ca10b7bb9 100644 --- a/drivers/soc/qcom/qti_battery_debug.c +++ b/drivers/soc/qcom/qti_battery_debug.c @@ -278,6 +278,7 @@ static int get_qbg_context_write(void *data, u64 val) DEFINE_DEBUGFS_ATTRIBUTE(get_qbg_context_debugfs_ops, NULL, get_qbg_context_write, "%llu\n"); +#ifdef CONFIG_DEBUG_FS static int battery_dbg_request_read_votable(struct battery_dbg_dev *bd, u32 id) { @@ -669,6 +670,12 @@ static int battery_dbg_add_debugfs(struct battery_dbg_dev *bd) debugfs_remove_recursive(bd_dir); return rc; } +#else +static int battery_dbg_add_debugfs(struct battery_dbg_dev *bd) +{ + return 0; +} +#endif static int battery_dbg_probe(struct platform_device *pdev) {