mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
msm: ipa: Fix compilation issues when DEBUG_FS is disabled
Adding changes to fix compiltaion errors when flag CONFIG_DEBUG_FS is disabled. Change-Id: Ib27c1ee1f883221f7cf240344b16d32219fd585c Signed-off-by: Armaan Siddiqui <asiddiqu@codeaurora.org> Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
This commit is contained in:
parent
03901ca73a
commit
764c42be07
4 changed files with 25 additions and 9 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/debugfs.h>
|
||||
|
|
@ -55,15 +55,18 @@
|
|||
} while (0)
|
||||
|
||||
#define IPA_GSB_MAX_MSG_LEN 512
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
static struct dentry *dent;
|
||||
static struct dentry *dfile_stats;
|
||||
static char dbg_buff[IPA_GSB_MAX_MSG_LEN];
|
||||
#endif
|
||||
|
||||
#define IPA_GSB_SKB_HEADROOM 256
|
||||
#define IPA_GSB_SKB_DUMMY_HEADER 42
|
||||
#define IPA_GSB_AGGR_BYTE_LIMIT 14
|
||||
#define IPA_GSB_AGGR_TIME_LIMIT 1000 /* 1000 us */
|
||||
|
||||
static struct dentry *dent;
|
||||
static struct dentry *dfile_stats;
|
||||
|
||||
/**
|
||||
* struct stats - driver statistics,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// 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/debugfs.h>
|
||||
|
|
@ -147,11 +147,6 @@ struct ipa_mhi_client_ctx {
|
|||
static struct ipa_mhi_client_ctx *ipa_mhi_client_ctx;
|
||||
static DEFINE_MUTEX(mhi_client_general_mutex);
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
#define IPA_MHI_MAX_MSG_LEN 512
|
||||
static char dbg_buff[IPA_MHI_MAX_MSG_LEN];
|
||||
static struct dentry *dent;
|
||||
|
||||
static char *ipa_mhi_channel_state_str[] = {
|
||||
__stringify(IPA_HW_MHI_CHANNEL_STATE_DISABLE),
|
||||
__stringify(IPA_HW_MHI_CHANNEL_STATE_ENABLE),
|
||||
|
|
@ -262,6 +257,11 @@ fail_dma_enable:
|
|||
return res;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
#define IPA_MHI_MAX_MSG_LEN 512
|
||||
static char dbg_buff[IPA_MHI_MAX_MSG_LEN];
|
||||
static struct dentry *dent;
|
||||
|
||||
static int ipa_mhi_print_channel_info(struct ipa_mhi_channel_ctx *channel,
|
||||
char *buff, int len)
|
||||
{
|
||||
|
|
@ -2186,10 +2186,12 @@ int ipa_mhi_destroy_all_channels(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
static void ipa_mhi_debugfs_destroy(void)
|
||||
{
|
||||
debugfs_remove_recursive(dent);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void ipa_mhi_deregister_pm(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3102,6 +3102,15 @@ struct dentry *ipa_debugfs_get_root(void)
|
|||
EXPORT_SYMBOL(ipa_debugfs_get_root);
|
||||
|
||||
#else /* !CONFIG_DEBUG_FS */
|
||||
#define INVALID_NO_OF_CHAR (-1)
|
||||
void ipa3_debugfs_init(void) {}
|
||||
void ipa3_debugfs_remove(void) {}
|
||||
int _ipa_read_ep_reg_v3_0(char *buf, int max_len, int pipe)
|
||||
{
|
||||
return INVALID_NO_OF_CHAR;
|
||||
}
|
||||
int _ipa_read_ep_reg_v4_0(char *buf, int max_len, int pipe)
|
||||
{
|
||||
return INVALID_NO_OF_CHAR;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -922,7 +922,9 @@ static int ipa_ut_framework_init(void)
|
|||
|
||||
ipa_assert_on(!ipa_ut_ctx);
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
ipa_ut_ctx->ipa_dbgfs_root = ipa_debugfs_get_root();
|
||||
#endif
|
||||
if (!ipa_ut_ctx->ipa_dbgfs_root) {
|
||||
IPA_UT_ERR("No IPA debugfs root entry\n");
|
||||
return -EFAULT;
|
||||
|
|
|
|||
Loading…
Reference in a new issue