drivers: Fix compilation issues when debugfs is disabled

Fix the compilation issues seen when CONFIG_DEBUG_FS is disabled in ufs
and thermal header files.

Change-Id: I670ffd0f51c9727d1e15f9f49f1afea25904fa8e
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
This commit is contained in:
Prakruthi Deepak Heragu 2020-04-01 14:15:56 -07:00
commit 3f19855835
2 changed files with 10 additions and 6 deletions

View file

@ -524,7 +524,8 @@ struct ufs_uic_err_reg_hist {
#endif
#if defined(CONFIG_SCSI_UFSHCD_QTI) && defined(CONFIG_DEBUG_FS)
#ifdef CONFIG_SCSI_UFSHCD_QTI
#ifdef CONFIG_DEBUG_FS
/**
* struct ufshcd_req_stat - statistics for request handling times (in usec)
* @min: shortest time measured
@ -550,6 +551,7 @@ enum ts_types {
TS_FLUSH = 5,
TS_NUM_STATS = 6,
};
#endif
enum ufshcd_ctx {
QUEUE_CMD,
@ -609,12 +611,14 @@ struct ufs_stats {
ktime_t last_hibern8_exit_tstamp;
#ifdef CONFIG_SCSI_UFSHCD_QTI
#ifdef CONFIG_DEBUG_FS
bool enabled;
u64 **tag_stats;
int q_depth;
int err_stats[UFS_ERR_MAX];
struct ufshcd_req_stat req_stats[TS_NUM_STATS];
int query_stats_arr[UPIU_QUERY_OPCODE_MAX][MAX_QUERY_IDN];
#endif
u32 pa_err_cnt_total;
u32 pa_err_cnt[UFS_EC_PA_MAX];
u32 dl_err_cnt_total;

View file

@ -94,11 +94,11 @@ struct tsens_device;
} \
} while (0)
#else
#define TSENS_DBG1(x...) pr_debug(x)
#define TSENS_DBG(x...) pr_debug(x)
#define TSENS_INFO(x...) pr_info(x)
#define TSENS_ERR(x...) pr_err(x)
#define TSENS_DUMP(x...) pr_info(x)
#define TSENS_DBG1(dev, msg, x...) pr_debug(msg, ##x)
#define TSENS_DBG(dev, msg, x...) pr_debug(msg, ##x)
#define TSENS_INFO(dev, msg, x...) pr_info(msg, ##x)
#define TSENS_ERR(dev, msg, x...) pr_err(msg, ##x)
#define TSENS_DUMP(dev, msg, x...) pr_info(msg, ##x)
#endif
#if IS_ENABLED(CONFIG_THERMAL_TSENS)